]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
3 hours agodhcp: random trivial cleanups (#42061) main
Yu Watanabe [Tue, 12 May 2026 23:15:11 +0000 (08:15 +0900)] 
dhcp: random trivial cleanups (#42061)

3 hours agosd-bus: handle non-string keys in dictionaries in JSON dump
Frantisek Sumsal [Tue, 12 May 2026 15:09:41 +0000 (17:09 +0200)] 
sd-bus: handle non-string keys in dictionaries in JSON dump

JSON only supports string keys in objects, but D-Bus specification is a
bit more lenient and allows dict entries to have any basic type as key.
Let's stringify allowed non-string keys so that we can represent them as
JSON objects.

Relevant snippet from the D-Bus specification:

  A DICT_ENTRY works exactly like a struct, but rather than parentheses
  it uses curly braces, and it has more restrictions. The restrictions
  are: it occurs only as an array element type; it has exactly two
  single complete types inside the curly braces; the first single
  complete type (the "key") must be a basic type rather than a container
  type. Implementations must not accept dict entries outside of arrays,
  must not accept dict entries with zero, one, or more than two fields,
  and must not accept dict entries with non-basic-typed keys. A dict
  entry is always a key-value pair.

Resolves: #32904

3 hours agosd-dhcp-client: always set default broadcast hardware address when unspecified
Yu Watanabe [Sun, 3 May 2026 06:16:17 +0000 (15:16 +0900)] 
sd-dhcp-client: always set default broadcast hardware address when unspecified

The default value for InfiniBand is copied from dhcp-network.c.

3 hours agologind: zero-initialize dispatch struct in vl_method_release_session()
Yaping Li [Sun, 10 May 2026 14:50:13 +0000 (14:50 +0000)] 
logind: zero-initialize dispatch struct in vl_method_release_session()

The local struct passed to sd_varlink_dispatch() was not
zero-initialized. Since sd_json_dispatch_full() does not call handlers
for absent optional fields, p.id could be left indeterminate when
the client omits the Id parameter, leading to use of uninitialized
memory.

5 hours agoTODO: fix typo
Yu Watanabe [Tue, 12 May 2026 20:34:21 +0000 (05:34 +0900)] 
TODO: fix typo

6 hours agorepart: Add BtrfsReplace= (#41109)
Daan De Meyer [Tue, 12 May 2026 20:24:51 +0000 (22:24 +0200)] 
repart: Add BtrfsReplace= (#41109)

This is a series of commits which adds a feature needed by GNOME OS'
installer. This was show during All Systems Go 2025 talk:
https://cfp.all-systems-go.io/all-systems-go-2025/talk/QRJVL3/

To sum up this PR, this changes first systemd-repart to use BLKPG
partition instead of loop devices when possible. We need then to always
rescan the partitions to try remove partitions if it failed. We allow
encrypted partitions to stay activated and with a chosen name. And we
add a new partition configuration `BtrfsReplace=`.

Note that "replace" comes from the command `btrfs replace`. But in the
case of systemd-repart, maybe "inplace" or "move" would make more sense.
I open to suggestions.

If it is better I can split this into several PRs.

The commits:

## repart: Reuse the backing fd for fdisk

Because fdisk_assign_device tries to open block devices with O_EXCL,
when it does it blocks cryptsetup from using partition block devices for
the same disk.

Since we already have a file descriptor for the device, we can just
share it and use fdisk_assign_device_by_fd instead.

## repart: Use blkpg partitions instead of loop devices when possible

We will want to allow future features to keep some devices mounted or
active. So in order to avoid leaving a mess of many loop devices, we can
just already use the partition block device already.

## repart: Rescan disk on failure if we create blkpg partitions on the
fly

Since we did not write the partition table, then the created partitions
should get removed on error.

## repart: Allow keeping luks2 volumes opened

## repart: Add BtrfsReplace=

BtrfsReplace=/mntpnt will move the btrfs filesystem from mount point to
the partition created. After moving, it will resize to take the whole
partition.
This is useful for OS installers that move a live system into a disk and
do not require a reboot.

## repart: Add VolumeName=

When a luks2 device mapper is to be kept alive after execution of
systemd-cryptsetup, the name of the volume will be taken from this
value.

## test: Add test for repart's BtrfsReplace

6 hours agotest: split unit tests (#42062)
Yu Watanabe [Tue, 12 May 2026 19:54:57 +0000 (04:54 +0900)] 
test: split unit tests (#42062)

7 hours agovmspawn: Prefer systemd-journal-remote from $PATH
Daan De Meyer [Tue, 12 May 2026 13:03:49 +0000 (13:03 +0000)] 
vmspawn: Prefer systemd-journal-remote from $PATH

$PATH might point to a systemd checkout containing
a newer version of systemd-journal-remote which we
should use, hence prefer an executable from $PATH
over the one from /usr/lib/systemd.

7 hours agoConvert journalctl to option macros (#42051)
Daan De Meyer [Tue, 12 May 2026 18:42:39 +0000 (20:42 +0200)] 
Convert journalctl to option macros (#42051)

8 hours agotest: move test cases for client_id_{hash,compare}_func() to test-dhcp-client-id.c 42062/head
Yu Watanabe [Mon, 4 May 2026 05:15:44 +0000 (14:15 +0900)] 
test: move test cases for client_id_{hash,compare}_func() to test-dhcp-client-id.c

8 hours agotest: move unit test for dhcp_identifier_set_iaid() to test-dhcp-duid.c
Yu Watanabe [Sat, 2 May 2026 21:58:10 +0000 (06:58 +0900)] 
test: move unit test for dhcp_identifier_set_iaid() to test-dhcp-duid.c

8 hours agodhcp-network: make dhcp_network_send_{raw,udp}_socket() take iovec_wrapper
Yu Watanabe [Fri, 20 Mar 2026 20:16:04 +0000 (05:16 +0900)] 
dhcp-network: make dhcp_network_send_{raw,udp}_socket() take iovec_wrapper

8 hours agodhcp: introduce sd_dhcp_message object and several related functions (part 1) (#42047)
Yu Watanabe [Tue, 12 May 2026 17:58:20 +0000 (02:58 +0900)] 
dhcp: introduce sd_dhcp_message object and several related functions (part 1) (#42047)

8 hours agotest: make TEST-75-RESOLVED robust against journald metadata race
Luca Boccassi [Tue, 12 May 2026 11:40:54 +0000 (12:40 +0100)] 
test: make TEST-75-RESOLVED robust against journald metadata race

Even after switching the wait loop to a polling `journalctl --grep`, the
test still fails intermittently because the very first messages emitted by
the freshly-spawned systemd-networkd-wait-online process can carry stale
journald metadata. journald associates `_SYSTEMD_UNIT=` (and friends) with
each entry by reading `/proc/$pid/cgroup` of the originating PID; if those
messages are produced before journald notices the cgroup migration into the
new service, they get tagged with `_SYSTEMD_UNIT=init.scope`. The
`-u $unit` filter then fails to match them.

Capture a journal cursor before launching the unit, and grep using
`--after-cursor=` plus `SYSLOG_IDENTIFIER=systemd-networkd-wait-online`
instead of `-u $unit`. SYSLOG_IDENTIFIER is set by the program itself, so
it's not subject to the cgroup-discovery race. The cursor bounds the search
to entries produced by this invocation, so prior wait-online runs in
earlier testcases don't interfere.

Logs from the failing run showing the messages exist but are tagged with
the wrong unit:

  [ 2570.948554] TEST-75-RESOLVED.sh[2178]: + unit=wait-online-dns-ede81407-b93b-459d-8e5d-69292b42d2ae.service
  [ 2571.023162] TEST-75-RESOLVED.sh[2178]: + systemd-run -u wait-online-dns-ede81407-b93b-459d-8e5d-69292b42d2ae.service ...
  [ 2571.049189] TEST-75-RESOLVED.sh[2178]: + timeout 30 bash -c 'until journalctl -b -u wait-online-dns-ede81407-b93b-459d-8e5d-69292b42d2ae.service --grep ...'
  [ 2571.964986] systemd-networkd-wait-online[2190]: dns0: No DNS server is accessible.
  [ 2601.051088] TEST-75-RESOLVED.sh[2178]: ++ cleanup

And for that 2571.964986 entry:

      _SYSTEMD_CGROUP=/init.scope
      _SYSTEMD_UNIT=init.scope
      _EXE=/usr/lib/systemd/systemd-executor
      _CMDLINE=/usr/lib/systemd/systemd-executor --deserialize 68 ...
      SYSLOG_IDENTIFIER=systemd-networkd-wait-online
      MESSAGE=dns0: No DNS server is accessible.

Follow-up for d4bc62713e09df09281f26f4bf385801a3ee2897

Co-developed-by: Claude Opus 4.7 <noreply@anthropic.com>
9 hours agocopy: fix typo and slightly update comment
Yu Watanabe [Tue, 12 May 2026 17:04:33 +0000 (02:04 +0900)] 
copy: fix typo and slightly update comment

9 hours agooption: fix typo
Yu Watanabe [Tue, 12 May 2026 16:57:12 +0000 (01:57 +0900)] 
option: fix typo

9 hours agopo: update Japanese translation
Yu Watanabe [Tue, 12 May 2026 16:50:30 +0000 (01:50 +0900)] 
po: update Japanese translation

9 hours agojson-stream: tolerate truncated SCM_RIGHTS on inbound messages
Daan De Meyer [Tue, 12 May 2026 10:26:37 +0000 (12:26 +0200)] 
json-stream: tolerate truncated SCM_RIGHTS on inbound messages

When an LSM (e.g. SELinux) denies an fd transfer or the receiver hits
RLIMIT_NOFILE, the kernel drops the fd(s) from the SCM_RIGHTS cmsg and
sets MSG_CTRUNC on the recvmsg(). recvmsg_safe() turns that into
-ECHRNG, which causes json_stream_read() to discard the data bytes
that were nevertheless received and the varlink server to silently
tear down the connection — leaving the caller waiting for a reply
that never comes.

Inline the recvmsg() call instead and, on MSG_CTRUNC, drop the partial
fds but keep the message data. The method handler will surface a clean
-ENXIO when it tries to peek the missing fd, which sd-varlink wraps as
io.systemd.System for the peer, instead of a hang. This matches the
recent sd-bus fix in 6c8de404c9 ('sd-bus: allow receiving messages with
MSG_CTRUNC set').

9 hours agoupdate TODO
Lennart Poettering [Tue, 12 May 2026 14:00:05 +0000 (16:00 +0200)] 
update TODO

9 hours agotest: Add test for repart's BlockDeviceReplace 41109/head
Valentin David [Thu, 12 Mar 2026 22:15:06 +0000 (23:15 +0100)] 
test: Add test for repart's BlockDeviceReplace

9 hours agorepart: Add VolumeName=
Valentin David [Thu, 12 Mar 2026 22:14:57 +0000 (23:14 +0100)] 
repart: Add VolumeName=

When a luks2 device mapper is to be kept alive after execution
of systemd-cryptsetup, the name of the volume will be taken
from this value.

9 hours agorepart: Add BlockDeviceReplace=
Valentin David [Thu, 12 Mar 2026 22:14:52 +0000 (23:14 +0100)] 
repart: Add BlockDeviceReplace=

BlockDeviceReplace=/mntpnt will move the btrfs filesystem from mount point to
the partition created. After moving, it will resize to take the whole
partition.

This is useful for OS installers that move a live system into a disk and
do not require a reboot.

9 hours agorepart: Allow keeping luks2 volumes opened
Valentin David [Thu, 12 Mar 2026 22:14:45 +0000 (23:14 +0100)] 
repart: Allow keeping luks2 volumes opened

9 hours agorepart: Rescan disk on failure if we create blkpg partitions on the fly
Valentin David [Thu, 12 Mar 2026 22:14:39 +0000 (23:14 +0100)] 
repart: Rescan disk on failure if we create blkpg partitions on the fly

Since we did not write the partition table, then the created partitions
should get removed on error.

9 hours agorepart: Use blkpg partitions instead of loop devices when possible
Valentin David [Thu, 12 Mar 2026 22:14:34 +0000 (23:14 +0100)] 
repart: Use blkpg partitions instead of loop devices when possible

We will want to allow future features to keep some devices mounted or
active. So in order to avoid leaving a mess of many loop devices, we can
just already use the partition block device already.

9 hours agorepart: Reuse the backing fd for fdisk
Valentin David [Thu, 12 Mar 2026 22:14:23 +0000 (23:14 +0100)] 
repart: Reuse the backing fd for fdisk

Because fdisk_assign_device tries to open block devices with O_EXCL, when it
does it blocks cryptsetup from using partition block devices for the same
disk.

Since we already have a file descriptor for the device, we can just share it
and use fdisk_assign_device_by_fd instead.

This requires at least libfdisk 2.35 (part of util-linux) which was
released in 2020.

10 hours agopo: Translated using Weblate (Lao)
Bone NI [Tue, 12 May 2026 06:16:55 +0000 (06:16 +0000)] 
po: Translated using Weblate (Lao)

Currently translated at 100.0% (266 of 266 strings)

po: Added translation using Weblate (Lao)

Co-authored-by: Bone NI <bounkirdni@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/lo/
Translation: systemd/main

10 hours agosd-dhcp-server-lease: rename dhcp_server_lease_append_json() -> dhcp_server_lease_bui... 42061/head
Yu Watanabe [Sun, 10 May 2026 13:28:03 +0000 (22:28 +0900)] 
sd-dhcp-server-lease: rename dhcp_server_lease_append_json() -> dhcp_server_lease_build_json()

It does not append, but build a new JSON variant.

10 hours agosd-dhcp-server: coding style fix
Yu Watanabe [Thu, 7 May 2026 02:18:05 +0000 (11:18 +0900)] 
sd-dhcp-server: coding style fix

10 hours agofuzz: modernize fuzz-dhcp-server
Yu Watanabe [Mon, 4 May 2026 05:16:00 +0000 (14:16 +0900)] 
fuzz: modernize fuzz-dhcp-server

- Do not include .c file.
- Use ASSERT_OK() and friends.

10 hours agodhcp-protocol: introduce more sub-options for DHCP Relay Agent Information option
Yu Watanabe [Sat, 2 May 2026 13:40:22 +0000 (22:40 +0900)] 
dhcp-protocol: introduce more sub-options for DHCP Relay Agent Information option

These new values will be used later.

10 hours agosd-dhcp-lease: drop sd_dhcp_lease.have_subnet_mask and have_broadcast
Yu Watanabe [Wed, 15 Apr 2026 18:02:27 +0000 (03:02 +0900)] 
sd-dhcp-lease: drop sd_dhcp_lease.have_subnet_mask and have_broadcast

NULL address is invalid in both cases. Let's refuse to use them when NULL.

11 hours agodhcp-message: introduce dhcp_message_{append,get}_option_hostname() and related functions 42047/head
Yu Watanabe [Sun, 19 Apr 2026 06:42:18 +0000 (15:42 +0900)] 
dhcp-message: introduce dhcp_message_{append,get}_option_hostname() and related functions

These are for DHCP options 12 (Hostname) and 81 (FQDN) options.

11 hours agodhcp-message: introduce dhcp_message_{append,get}_option_parameter_request_list()
Yu Watanabe [Sun, 19 Apr 2026 06:47:45 +0000 (15:47 +0900)] 
dhcp-message: introduce dhcp_message_{append,get}_option_parameter_request_list()

These are for DHCP option 55 (parameter request list).

11 hours agodhcp-message: introduce dhcp_message_{append,get}_option_client_id()
Yu Watanabe [Sun, 19 Apr 2026 06:51:39 +0000 (15:51 +0900)] 
dhcp-message: introduce dhcp_message_{append,get}_option_client_id()

These are for DHCP option 61 (client ID).

11 hours agodhcp-message: introduce dhcp_message_{append,get}_option_string()
Yu Watanabe [Sun, 19 Apr 2026 05:41:29 +0000 (14:41 +0900)] 
dhcp-message: introduce dhcp_message_{append,get}_option_string()

These are for DHCP options that takes a string e.g. DHCP options
17 (root path), 60 (vendor class identifier), and so on.

11 hours agodhcp-message: introduce dhcp_message_{append,get}_option_addresses()
Yu Watanabe [Sun, 19 Apr 2026 06:19:41 +0000 (15:19 +0900)] 
dhcp-message: introduce dhcp_message_{append,get}_option_addresses()

These functions support multiple addresses.

These are for e.g. DHCP options 6 (DNS servers), 42 (NTP servers) and so on.

11 hours agodhcp-message: introduce dhcp_message_{append,get}_option_address()
Yu Watanabe [Sun, 19 Apr 2026 05:46:59 +0000 (14:46 +0900)] 
dhcp-message: introduce dhcp_message_{append,get}_option_address()

These are equivalent to dhcp_message_{append,get}_option_be32(), but for
type safety.

These are for e.g. DHCP options 50 (requested IP address).

11 hours agodhcp-message: introduce dhcp_message_{append,get}_option_sec()
Yu Watanabe [Mon, 13 Apr 2026 02:23:03 +0000 (11:23 +0900)] 
dhcp-message: introduce dhcp_message_{append,get}_option_sec()

These are for e.g. DHCP options 51 (lease time), 58 (renewal time), and
59 (rebinding time).

11 hours agodhcp-message: introduce sd_dhcp_message object and several functions for the object
Yu Watanabe [Sun, 22 Mar 2026 07:19:06 +0000 (16:19 +0900)] 
dhcp-message: introduce sd_dhcp_message object and several functions for the object

11 hours agocore: when skipping state deserializing units, also skip job subsections (#41957)
Zbigniew Jędrzejewski-Szmek [Tue, 12 May 2026 15:12:59 +0000 (17:12 +0200)] 
core: when skipping state deserializing units, also skip job subsections (#41957)

If a unit has active jobs, when it gets serialized there are job
subsections, each with their own empty line marker. The skipping
function ignores this and skips until the marker, but then leaves
the job in place, breaking deserialization.
Consume jobs subsections too.

This shows up now that there's TEST-07-PID1.alias-corruption,
which occasionally fails when the aliased unit happens to
still have a job when the reexec happens.

```
[  967.551630] TEST-07-PID1.sh[179]: + echo 'Testing with: systemctl daemon-reexec'
[  967.551630] TEST-07-PID1.sh[179]: Testing with: systemctl daemon-reexec
[  968.405274] TEST-07-PID1.sh[179]: + echo '--- Attempt 1/3 ---'
[  968.405274] TEST-07-PID1.sh[179]: --- Attempt 1/3 ---
[  968.698641] TEST-07-PID1.sh[179]: + echo 'Running daemon-reexec...'
[  968.698641] TEST-07-PID1.sh[179]: Running daemon-reexec...
[  969.130261] TEST-07-PID1.sh[179]: + echo 'legit.service PID remains 1282. Attempt 1 passed.'
[  969.130261] TEST-07-PID1.sh[179]: legit.service PID remains 1282. Attempt 1 passed.
[  970.870456] TEST-07-PID1.sh[179]: + echo '--- Attempt 2/3 ---'
[  970.870456] TEST-07-PID1.sh[179]: --- Attempt 2/3 ---
[  971.267205] TEST-07-PID1.sh[179]: + echo 'Running daemon-reexec...'
[  971.267205] TEST-07-PID1.sh[179]: Running daemon-reexec...
[  971.715743] TEST-07-PID1.sh[179]: + echo 'legit.service PID changed from 1282 to 1643!'
[  971.715743] TEST-07-PID1.sh[179]: legit.service PID changed from 1282 to 1643!
```

https://github.com/systemd/systemd/actions/runs/25376867873/job/74414201255

11 hours agonetwork: use TLV and iovec to manage several DHCP options (#42045)
Yu Watanabe [Tue, 12 May 2026 15:02:10 +0000 (00:02 +0900)] 
network: use TLV and iovec to manage several DHCP options (#42045)

12 hours agostoragectl: add assert for args 42051/head
Zbigniew Jędrzejewski-Szmek [Tue, 12 May 2026 14:22:18 +0000 (16:22 +0200)] 
storagectl: add assert for args

coccinelle-storage check started failing…

12 hours agoImplement Path/Scope/Swap/Timer Context/Runtime for `io.systemd.Unit.List` (#41980)
Lennart Poettering [Tue, 12 May 2026 14:12:36 +0000 (16:12 +0200)] 
Implement Path/Scope/Swap/Timer Context/Runtime for `io.systemd.Unit.List` (#41980)

The PR implements the following objects + tests for
io.systemd.Unit.List:
* PathContext
* PathRuntime
* ScopeContext
* ScopeRuntime
* SwapContext
* SwapRuntime
* TimerContext
* TimerRuntime

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
* https://github.com/systemd/systemd/pull/39391

12 hours agobtrfs-util: clear RDONLY flag on subvolume before destroy ioctl
Daan De Meyer [Tue, 12 May 2026 11:19:18 +0000 (13:19 +0200)] 
btrfs-util: clear RDONLY flag on subvolume before destroy ioctl

Without CAP_SYS_ADMIN, btrfs_ioctl_snap_destroy() runs an
inode_permission(MAY_WRITE) check against the target subvolume root, which
btrfs_permission() rejects with EROFS for a read-only subvolume. As a
result, unprivileged removal of a read-only subvolume fails — both via
btrfs_subvol_remove_at() directly and via the recursive cleanup path used
by rm_rf_subvolume_and_freep(), which propagates the EROFS up.

Detect EROFS after the destroy ioctl, clear the RDONLY flag (only inode
ownership is required for BTRFS_IOC_SUBVOL_SETFLAGS), and retry once.

While at it, fix the surrounding comments: BTRFS_IOC_SNAP_DESTROY drops the
entire subvolume tree, so regular files inside are irrelevant; ENOTEMPTY
from the ioctl indicates nested subvolumes (BTRFS_ROOT_REF_KEY entries) via
may_destroy_subvol(), not non-empty contents.

12 hours agojournalctl: move handling of --smart-relinquish-var to action logic
Zbigniew Jędrzejewski-Szmek [Tue, 12 May 2026 12:37:35 +0000 (14:37 +0200)] 
journalctl: move handling of --smart-relinquish-var to action logic

The help string for --smart-relinquish-var and --relinquish-var
were in reversed order because of the _fallthrough_.

We would resolve the conditions for "smart relinquish" immediately
in parse_argv() and call 'return 0' if the conditions were wrong,
terminating option parsing and the program. It seems nicer to delay
action until later. This makes the logic flow more standard. This
also allows the option parsing cases to be exchanged, fixing the
issue with --help.

12 hours agojournalctl: drop some parentheses
Zbigniew Jędrzejewski-Szmek [Tue, 12 May 2026 12:05:01 +0000 (14:05 +0200)] 
journalctl: drop some parentheses

12 hours agojournalctl: convert to OPTION macros
Zbigniew Jędrzejewski-Szmek [Tue, 12 May 2026 11:28:35 +0000 (13:28 +0200)] 
journalctl: convert to OPTION macros

Two namespaces are used: "journalctl" and "journalctl-varlink". Help for
--user/--system in the latter is added, even though it is not used yet.
I think it'll be good to have this for introspection.

The four FSS-related options (--interval, --verify-key, --force,
--setup-keys) unfortunately each gain an inline #if HAVE_GCRYPT / #else;
the EOPNOTSUPP fallback is duplicated four times.

The metavar for --identifier/--exclude-identifier is changed to "ID"
to make the layout nicer. (And because that seems to make more sense.)

Co-developed-by: Claude Opus 4.7 <noreply@anthropic.com>
13 hours ago60-sensor.hwdb iio/accel fix for Advan Evo-X 13 (#42037)
drhydroxide [Tue, 12 May 2026 13:27:02 +0000 (20:27 +0700)] 
60-sensor.hwdb iio/accel fix for Advan Evo-X 13 (#42037)

Added fix for Advan Evo-X 13 2-in-1 laptop

Relevant output of `udevadm info --export-db`
```
P: /devices/pci0000:00/0000:00:15.2/i2c_designware.3/i2c-2/i2c-NSA2513:00/iio:device0
M: iio:device0
R: 0
J: +iio:iio:device0
U: iio
T: iio_device
E: DEVPATH=/devices/pci0000:00/0000:00:15.2/i2c_designware.3/i2c-2/i2c-NSA2513:00/iio:device0
E: DEVTYPE=iio_device
E: SUBSYSTEM=iio
E: USEC_INITIALIZED=5462149
E: ACCEL_MOUNT_MATRIX=-1,0,0;0,-1,0;0,0,1
E: IIO_SENSOR_PROXY_TYPE=iio-poll-accel
E: SYSTEMD_WANTS=iio-sensor-proxy.service
E: TAGS=:systemd:
E: CURRENT_TAGS=:systemd:
```

13 hours agoshared/options: add OPTION_COMMON_{SYSTEM,USER}
Zbigniew Jędrzejewski-Szmek [Tue, 12 May 2026 11:58:47 +0000 (13:58 +0200)] 
shared/options: add OPTION_COMMON_{SYSTEM,USER}

We have different help strings for --user/--system in different places, so this
only covers a subset of --system/--user instances. But this particular help
seems to be the most widely used.

(In a few cases, the help string is fixed: it should be "system mode", not
"per-system mode".)

13 hours agochase: Use openat2() if available
Daan De Meyer [Mon, 11 May 2026 17:42:45 +0000 (19:42 +0200)] 
chase: Use openat2() if available

Let's make use of openat2() if we can in chaseat().

13 hours agochase: Use ELOOP for CHASE_PROHIBIT_SYMLINKS error
Daan De Meyer [Mon, 11 May 2026 17:34:01 +0000 (19:34 +0200)] 
chase: Use ELOOP for CHASE_PROHIBIT_SYMLINKS error

Matches the behavior of openat2() with RESOLVE_NO_SYMLINKS
which makes introducing support for openat2() easier.

14 hours agope-binary: fix "systemd-sbsign calculates wrong PE checksum"
hschloss [Wed, 6 May 2026 15:07:40 +0000 (17:07 +0200)] 
pe-binary: fix "systemd-sbsign calculates wrong PE checksum"

14 hours agojournalctl: reorder parse_argv() cases to match --help
Zbigniew Jędrzejewski-Szmek [Mon, 11 May 2026 14:25:59 +0000 (16:25 +0200)] 
journalctl: reorder parse_argv() cases to match --help

Pure reordering. ARG_SMART_RELINQUISH_VAR is kept immediately before
ARG_RELINQUISH_VAR because of the existing _fallthrough_; that's the
only deviation from strict --help order.

Co-developed-by: Claude Opus 4.7 <noreply@anthropic.com>
15 hours agoIntroduce helper functions to parse and build length-prefixed data and TLV data ...
Yu Watanabe [Tue, 12 May 2026 11:08:40 +0000 (20:08 +0900)] 
Introduce helper functions to parse and build length-prefixed data and TLV data (#41802)

These are currently not used yet, but will be used later in
parsing/building network packets like DHCP message.

15 hours agodhcp: use struct iovec_wrapper to manage user class 42045/head
Yu Watanabe [Mon, 23 Mar 2026 18:53:51 +0000 (03:53 +0900)] 
dhcp: use struct iovec_wrapper to manage user class

15 hours agosd-dhcp-option: drop unused sd_dhcp_option
Yu Watanabe [Sun, 26 Apr 2026 04:22:07 +0000 (13:22 +0900)] 
sd-dhcp-option: drop unused sd_dhcp_option

15 hours agodhcp: use TLV object to manage extra and vendor options
Yu Watanabe [Sun, 22 Mar 2026 08:00:33 +0000 (17:00 +0900)] 
dhcp: use TLV object to manage extra and vendor options

Note, previously we replaced the previous option with the same option code with
new one. But, DHCP message can have multiple options with same option code.
Hence, this make the conf parser not replace, but append new one.

15 hours agosd-dhcp-protocol: rename DHCP option 43, 124, and 125
Yu Watanabe [Mon, 27 Apr 2026 02:38:25 +0000 (11:38 +0900)] 
sd-dhcp-protocol: rename DHCP option 43, 124, and 125

There are four DHCP options with confusing names:
Option 43: Vendor-Specific Information
Option 60: Vendor Class Identifier
Option 124: Vendor-Identifying Vendor Class
Option 125: Vendor-Identifying Vendor-Specific Information

Let's use their full names for their corresponding enums.

15 hours agobtrfs-util: Make nested subvolume operations work unpriv
Daan De Meyer [Mon, 11 May 2026 19:58:24 +0000 (21:58 +0200)] 
btrfs-util: Make nested subvolume operations work unpriv

BTRFS_IOC_SEARCH is only available to root in the
initial userns. This means we fail to recursively
snapshot even if a subvolume has no nested subvolumes
at the moment.

Let's fix this by using the newer btrfs ioctls which
do work even if we don't have CAP_SYS_ADMIN in the initial
userns.

16 hours agohwdb/keyboard: Map f21 key on Wareus B15
Artem Proskurnev [Tue, 12 May 2026 08:07:39 +0000 (11:07 +0300)] 
hwdb/keyboard: Map f21 key on Wareus B15

Addition to PR https://github.com/systemd/systemd/pull/41181
Plasma-workspace OSD notifications about turning the touchpad on
and off are guided by f21. When this match is specified,
KDE notifies on this laptop that the on/off switch of the atchpad
state is pressed.
Fix dmesg:
atkbd serio0: Unknown key pressed (translated set 2, code 0xc1 on isa0060/serio0).

16 hours agotest: start systemd-report-basic.socket again
Luca Boccassi [Mon, 11 May 2026 21:36:29 +0000 (22:36 +0100)] 
test: start systemd-report-basic.socket again

SUSE uses a different preset, so don't just assert in the test,
instead just start the socket in case it is not enabled

TEST-74-AUX-UTILS.sh[1594]: ++ systemctl is-enabled systemd-report-basic.socket
TEST-74-AUX-UTILS.sh[1540]: + [[ disabled == enabled ]]
TEST-74-AUX-UTILS.sh[120]: + echo 'Subtest /usr/lib/systemd/tests/testdata/units/TEST-74-AUX-UTILS.report.sh failed'

Follow-up for 4409e52494d803426a365b6636a66fd2dfc70b62

19 hours agotlv-util: introduce tlv-util that handles Tag-Length-Value data format 41802/head
Yu Watanabe [Mon, 20 Apr 2026 20:05:32 +0000 (05:05 +0900)] 
tlv-util: introduce tlv-util that handles Tag-Length-Value data format

In many network protocols e.g. DHCP, the TLV format is used.
Let's introduce a simple parser and builder of the data format.

19 hours agoiovec-wrapper: reintroduce iovw_free() and iovw_free_free()
Yu Watanabe [Thu, 23 Apr 2026 18:10:16 +0000 (03:10 +0900)] 
iovec-wrapper: reintroduce iovw_free() and iovw_free_free()

They were dropped by the commit 267b16f33c5636617927f15d7ae6b945c862a587,
but will be used later. Hence, let's reintroduce them.

19 hours agoiovec-wrapper: introduce iovec_split() and iovw_merge()
Yu Watanabe [Thu, 23 Apr 2026 18:33:36 +0000 (03:33 +0900)] 
iovec-wrapper: introduce iovec_split() and iovw_merge()

In many network protocols, the length-prefixed data format is often
used. Let's add a simple parser and builder for the format.

19 hours agoiovec-wrapper: introduce iovw_put_full() and friends to make them accept zero length...
Yu Watanabe [Sat, 25 Apr 2026 00:57:41 +0000 (09:57 +0900)] 
iovec-wrapper: introduce iovw_put_full() and friends to make them accept zero length entry

These will be used later. Preparation for later commits.

19 hours agoiovec-wrapper: make iovw_size() take NULL again
Yu Watanabe [Thu, 23 Apr 2026 18:27:36 +0000 (03:27 +0900)] 
iovec-wrapper: make iovw_size() take NULL again

This partially reverts 267b16f33c5636617927f15d7ae6b945c862a587.

We usually make xyz_size() take NULL, e.g. hashmap_size().

20 hours agovmspawn: Add missing error logging
Daan De Meyer [Mon, 11 May 2026 19:58:24 +0000 (21:58 +0200)] 
vmspawn: Add missing error logging

27 hours agofirstboot,sysinstall,hostnamed: always show FANCY_NAME=
Lennart Poettering [Wed, 6 May 2026 14:13:12 +0000 (16:13 +0200)] 
firstboot,sysinstall,hostnamed: always show FANCY_NAME=

This makes sure that whenever we want to show the OS name we can show
the fancy name. Thus this moves the escaping/validation of the fancy
name out of hostnamed into generic code, and then makes use of it in
sysinstall,firstboot,prompt-util.

28 hours agomkosi: Drop CPUs= limit
Daan De Meyer [Mon, 11 May 2026 19:58:24 +0000 (21:58 +0200)] 
mkosi: Drop CPUs= limit

Limiting VMs to 2 cpus was cargo culting without any
actual data that this benefits performance. The host OS
has a scheduler, let's make use of it and give the VM access
to all the CPUs. This doesn't mean they become inaccessible to
the host, it just means the VM gets as many virtual CPUs as the
host has CPU cores (threads). How they get scheduled is still up
to the host OS.

28 hours agounits: pull in basic.target rather than sysinit.target from system-install.target
Lennart Poettering [Mon, 11 May 2026 15:17:35 +0000 (17:17 +0200)] 
units: pull in basic.target rather than sysinit.target from system-install.target

Many of our services are nowadays implemented via socket activation, and
hence require sockets.target to be active to be accessible. One of them
is mute-console.socket, which we typically want to use from
systemd-firstboot.service, systemd-sysinstall.service and other related
services. Hence let's pull in basic.target rather than sysinit.target
from system-install.target since it pulls sockets.target in too.

Effectively, this doesn't change much except for pulling in a bunch more
sockets, and frankly going for sysinit.target was really a bug to begin
width.

31 hours agoAdd liburing to build image packages
Daan De Meyer [Mon, 11 May 2026 12:59:39 +0000 (14:59 +0200)] 
Add liburing to build image packages

31 hours agovmspawn: Use builtin vdagent instead of spicevmc
Daan De Meyer [Mon, 11 May 2026 11:42:53 +0000 (13:42 +0200)] 
vmspawn: Use builtin vdagent instead of spicevmc

The builtin one also makes the clipboard and such work. spicevmc
is only required for remote desktop use cases, so let's use the
builtin one instead.

31 hours agoboot,vconsole: Propagate UEFI HII keyboard layout to the OS
Daan De Meyer [Mon, 11 May 2026 13:03:49 +0000 (13:03 +0000)] 
boot,vconsole: Propagate UEFI HII keyboard layout to the OS

UEFI firmware can report the currently-active keyboard layout via
EFI_HII_DATABASE_PROTOCOL.GetKeyboardLayout(). The layout descriptor
includes an RFC 4646 / BCP 47 language tag (e.g. "en-US"). Query this
from sd-boot/sd-stub and write it to a new LoaderKeyboardLayout EFI
variable, advertised through a new EFI_LOADER_FEATURE_KEYBOARD_LAYOUT
feature bit.

On the OS side, systemd-vconsole-setup reads the variable as a
lowest-priority fallback for the console keymap. To map the BCP 47
tag to a vconsole keymap we extend /usr/share/systemd/kbd-model-map
with an optional sixth column listing the comma-separated BCP 47 tags
each row covers; a new find_vconsole_keymap_for_bcp47() helper walks
the file, preferring an exact tag match and otherwise falling back to
the row whose tag matches the input's primary subtag. Credentials,
/etc/vconsole.conf, and vconsole.keymap= on the kernel command line
continue to take precedence.

bootctl status surfaces the new variable, printing the language tag
or "n/a (not reported by firmware)" when sd-boot advertises the
feature but the firmware HII database didn't expose a layout (common
on QEMU without a USB keyboard, since EDK2's PS/2 driver does not
register an HII keyboard layout).

32 hours agohwdb/keyboard: fix match for X+ Piccolo & revert workaround (#42018)
Luca Boccassi [Mon, 11 May 2026 18:17:42 +0000 (19:17 +0100)] 
hwdb/keyboard: fix match for X+ Piccolo & revert workaround (#42018)

The controller is used in other devices, and some of these do have a
separate keypad with enter key.

This also reverts a workaround made for *Clevo PA70ES (Avell C73)* in
b7be9ccc8f4299269f72bde49e426a7a9d484da9.

Fixes: 7ae0a588154ad279deaa98f82c15470684189856
33 hours agocurl-util: Fix clang-tidy warnings (#42030)
Daan De Meyer [Mon, 11 May 2026 17:17:53 +0000 (19:17 +0200)] 
curl-util: Fix clang-tidy warnings (#42030)

Use the ref/unref macros to make sure the parameter names match

Follow-up for 87cec65cae656f6ac2e702bd60dad6dd4fdae636

34 hours agoRevert "hwdb/keyboard: fix KP_Enter on Clevo PA70ES" 42018/head
Christian Hesse [Mon, 11 May 2026 08:10:06 +0000 (10:10 +0200)] 
Revert "hwdb/keyboard: fix KP_Enter on Clevo PA70ES"

Fixed in previous commit.

This reverts commit b7be9ccc8f4299269f72bde49e426a7a9d484da9.

34 hours agohwdb/keyboard: use vendor/product specific match for X+ Piccolo
Christian Hesse [Mon, 11 May 2026 08:12:47 +0000 (10:12 +0200)] 
hwdb/keyboard: use vendor/product specific match for X+ Piccolo

The controller is used in other devices, and some of these do have a
separate keypad with enter key.

Fixes: 7ae0a588154ad279deaa98f82c15470684189856
35 hours agosysupdate: Allow vacuuming partially downloaded updates and improve error reporting...
Lennart Poettering [Mon, 11 May 2026 15:27:05 +0000 (17:27 +0200)] 
sysupdate: Allow vacuuming partially downloaded updates and improve error reporting in that case (#41775)

See the commit messages for details.

Fixes: https://github.com/systemd/systemd/issues/41502
35 hours agovmspawn: Attach a USB keyboard in GUI mode
Daan De Meyer [Mon, 11 May 2026 13:00:19 +0000 (15:00 +0200)] 
vmspawn: Attach a USB keyboard in GUI mode

EDK2's UsbKbDxe is the only driver that registers a default HII
keyboard layout via the HII database protocol; the PS/2 driver does
not. Adding a USB xHCI controller and usb-kbd in CONSOLE_GUI mode
gives us a layout to query, which systemd-boot exports through the
LoaderKeyboardLayout EFI variable — useful for exercising that
codepath end-to-end.

35 hours agounits: enable systemd-report-basic.socket by default
Michael Vogt [Fri, 8 May 2026 14:37:52 +0000 (16:37 +0200)] 
units: enable systemd-report-basic.socket by default

In https://github.com/systemd/systemd/pull/41688 we merged metrics
and facts for systemd-report. However while some metric sources
are enabled by default (like `io.systemd.{Manager,Network}`) the
`io.systemd.Basic` service is not enabled by default.

This commit changes this and enables it by default.

We could also enable the systemd-report-cgroup.socket but that sends
a lot more data not sure that is a good default.

35 hours agorepart: make definitions varlink parameter actually optional
Lennart Poettering [Mon, 11 May 2026 13:54:12 +0000 (15:54 +0200)] 
repart: make definitions varlink parameter actually optional

The Varlink iterface said the definitions directory was mandatory, and
so did the dispatch table. But that's nonsense, the code is completely
fine to operate without (same as cmdline repart invocations): it will
just use the standard definitions dir.

Fix that.

35 hours agoSome curl improvements (#41905)
Lennart Poettering [Mon, 11 May 2026 14:56:03 +0000 (16:56 +0200)] 
Some curl improvements (#41905)

36 hours agoTEST-67-INTEGRITY: pre-load crypto modules and skip unsupported algorithms
Luca Boccassi [Mon, 11 May 2026 11:58:13 +0000 (12:58 +0100)] 
TEST-67-INTEGRITY: pre-load crypto modules and skip unsupported algorithms

The test occasionally fails on GHA CI when formatting with xxhash64
because dm-integrity's crypto_alloc_shash() -> request_module() path
flakily fails to load the algorithm:

[   29.172664] TEST-67-INTEGRITY.sh[447]: + for a in crc32c crc32 xxhash64 sha1 sha256
[   29.172664] TEST-67-INTEGRITY.sh[447]: + [[ xxhash64 == crc32 ]]
[   29.172664] TEST-67-INTEGRITY.sh[447]: + test_one xxhash64 0
[   29.172664] TEST-67-INTEGRITY.sh[447]: + integritysetup format /dev/loop0 --batch-mode -I xxhash64 ''
[   29.223383] TEST-67-INTEGRITY.sh[1220]: device-mapper: reload ioctl on temporary-cryptsetup-fa8bebe3-1d87-4796-91e8-abc02c487bb5 (254:0) failed: No such file or directory
[   29.226916] kernel: device-mapper: table: 254:0: integrity: Invalid internal hash (-ENOENT)
[   29.227415] kernel: device-mapper: ioctl: error adding target to table
[   29.231586] TEST-67-INTEGRITY.sh[1220]: Cannot format integrity for device /dev/loop0.

Preload each algorithm's crypto module before use, and skip algorithms
that are not registered in /proc/crypto.

Co-developed-by: Claude Opus 4.7 <noreply@anthropic.com>
38 hours agoclang-tidy: Drop unknown gcc compiler args
Daan De Meyer [Sun, 10 May 2026 19:24:26 +0000 (21:24 +0200)] 
clang-tidy: Drop unknown gcc compiler args

clang-tidy recently gained support to allow dropping
compiler args from the entries parsed from the compilation
database. Let's make use of this to drop the two compiler
args we use with gcc that clang doesn't support so we can
run clang-tidy on meson build trees configured to use gcc
without getting tons of false positives.

38 hours agofileio: add new read_boolean_file() helper (#41963)
Lennart Poettering [Mon, 11 May 2026 12:16:05 +0000 (14:16 +0200)] 
fileio: add new read_boolean_file() helper (#41963)

This adds a new read_boolean_file() helper that combines
read_one_line_file() and parse_boolean() into one. 3 call sites are
converted to us it.

38 hours agotest: use jq // empty instead of grep -v null in Unit.List tests 41980/head
Ivan Kruglov [Thu, 7 May 2026 17:55:32 +0000 (10:55 -0700)] 
test: use jq // empty instead of grep -v null in Unit.List tests

Replace `grep -v null` with jq's `// empty` alternative operator when filtering unit IDs. With `set -o pipefail`, `grep` returns 1 when no lines match, which aborts the script before conditional guards can run. The `// empty` operator suppresses null output directly in jq without risking a pipeline failure.

38 hours agocore: implement TimerContext/Runtime for io.systemd.Unit.List + tests
Ivan Kruglov [Thu, 7 May 2026 12:12:48 +0000 (05:12 -0700)] 
core: implement TimerContext/Runtime for io.systemd.Unit.List + tests

Add varlink context and runtime builders for .timer units:

TimerContext: MonotonicTimers (with MonotonicTimerBase enum), CalendarTimers, Unit, OnClockChange, OnTimezoneChange, AccuracyUSec, RandomizedDelayUSec, RandomizedOffsetUSec, FixedRandomDelay, Persistent, WakeSystem, RemainAfterElapse, DeferReactivation
TimerRuntime: Result (TimerResult enum), NextElapseUSecRealtime, NextElapseUSecMonotonic, LastTriggerUSec

MonotonicTimerSpec and CalendarTimerSpec are separate types since they have different value types (int vs string). MonotonicTimerBase and TimerResult are proper varlink enum types.

Compared to the old io-systemd-Unit-List branch, this adds RandomizedOffsetUSec and DeferReactivation (both present in D-Bus but previously missing), and adds full runtime fields.

Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
38 hours agocore: implement SwapContext/Runtime for io.systemd.Unit.List + tests
Ivan Kruglov [Thu, 7 May 2026 12:05:24 +0000 (05:05 -0700)] 
core: implement SwapContext/Runtime for io.systemd.Unit.List + tests

Add varlink context and runtime builders for .swap units:

SwapContext: What, Priority, Options, TimeoutUSec, ExecActivate, ExecDeactivate
SwapRuntime: ControlPID, Result, CleanResult, UID, GID (SwapResult enum)

SwapResult is exposed as a proper varlink enum type. Runtime follows the same pattern as MountRuntime (ControlPID, Result, CleanResult, ref UID/GID).

The integration test is conditional since swap units may not be present on all systems.

Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
38 hours agocore: implement ScopeContext/Runtime for io.systemd.Unit.List + tests
Ivan Kruglov [Thu, 7 May 2026 12:02:01 +0000 (05:02 -0700)] 
core: implement ScopeContext/Runtime for io.systemd.Unit.List + tests

Add varlink context and runtime builders for .scope units:

ScopeContext: OOMPolicy (enum), RuntimeMaxUSec, RuntimeRandomizedExtraUSec, TimeoutStopUSec
ScopeRuntime: Result (ScopeResult enum)

Both OOMPolicy and ScopeResult are exposed as proper varlink enum types.

Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
40 hours agotree-wide: port various places to read_boolean_file() 41963/head
Lennart Poettering [Mon, 11 May 2026 09:48:11 +0000 (11:48 +0200)] 
tree-wide: port various places to read_boolean_file()

40 hours agofileio: add new read_boolean_file() helper
Lennart Poettering [Wed, 6 May 2026 13:17:36 +0000 (15:17 +0200)] 
fileio: add new read_boolean_file() helper

40 hours agofileio: teach read_one_line_file_at() XAT_FDROOT support
Lennart Poettering [Mon, 11 May 2026 09:34:22 +0000 (11:34 +0200)] 
fileio: teach read_one_line_file_at() XAT_FDROOT support

40 hours agoshared: move OOMPolicy varlink enum to varlink-idl-common
Ivan Kruglov [Thu, 7 May 2026 12:47:59 +0000 (05:47 -0700)] 
shared: move OOMPolicy varlink enum to varlink-idl-common

OOMPolicy is used by both io.systemd.Manager (DefaultOOMPolicy) and io.systemd.Unit (ScopeContext.OOMPolicy), so it belongs in the shared common types alongside ManagedOOMMode and EmergencyAction.

40 hours agocore: implement PathContext/Runtime for io.systemd.Unit.List + tests
Ivan Kruglov [Thu, 7 May 2026 10:15:15 +0000 (03:15 -0700)] 
core: implement PathContext/Runtime for io.systemd.Unit.List + tests

Add varlink context and runtime builders for .path units:

PathContext: Paths (array of PathType enum + path specs), Unit, MakeDirectory, DirectoryMode, TriggerLimit
PathRuntime: Result (PathResult enum)

Both PathType and PathResult are exposed as proper varlink enum types.

Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
40 hours agoelf-util: pass exectable path to dwfl_core_file_report
Ambareesh Balaji [Sun, 10 May 2026 23:25:13 +0000 (23:25 +0000)] 
elf-util: pass exectable path to dwfl_core_file_report

Without it, stack trace symbols fail to resolve with .gnu_debuglink
split debug info.

41 hours agotest-path-util: add coverage for path edge cases
favilances [Sat, 9 May 2026 18:52:04 +0000 (21:52 +0300)] 
test-path-util: add coverage for path edge cases

Path utility helpers are used throughout systemd for validation, comparison and manipulation of filesystem paths. Add coverage for additional corner cases around absolute path detection, normalization and prefix matching so regressions in these common helpers are easier to catch.

Co-developed-by: OpenAI Codex <noreply@openai.com>
Signed-off-by: favilances <favilances@proton.me>
41 hours agotest: bump TEST-58-REPART timeouts with sanitizers
Luca Boccassi [Fri, 8 May 2026 19:25:56 +0000 (20:25 +0100)] 
test: bump TEST-58-REPART timeouts with sanitizers

The test is flaky under sanitizers as the timeouts seem to be too short,
bump them like we do in other tests to try and make it more robust when
running with sanitizers

41 hours agotest: fix flaky TEST-07-PID1.socket-defer.sh
Luca Boccassi [Fri, 8 May 2026 15:16:04 +0000 (16:16 +0100)] 
test: fix flaky TEST-07-PID1.socket-defer.sh

The socket's SubState transitions from 'running' to 'listening' shortly
after the triggered service becomes inactive, so the assert can race and
observe the stale 'running' state:

[ 1882.425335] systemd[1]: TEST-07-PID1-socket-defer-23279.service: Changed dead -> running
[ 1882.495150] TEST-07-PID1.sh[20535]: ++ systemctl show TEST-07-PID1-socket-defer-23279.socket -P SubState
[ 1882.514239] TEST-07-PID1.sh[20509]: + assert_eq running listening
[ 1882.510529] systemd[1]: TEST-07-PID1-socket-defer-23279.socket: Flushing socket before listening.
[ 1882.510559] systemd[1]: TEST-07-PID1-socket-defer-23279.socket: Changed running -> listening

Poll for 30s instead of directly asserting to try and make it more robust

41 hours agotest: workaroud flaky TEST-53-TIMER.restart-trigger against journald cgroup attributi...
Luca Boccassi [Fri, 8 May 2026 14:09:25 +0000 (15:09 +0100)] 
test: workaroud flaky TEST-53-TIMER.restart-trigger against journald cgroup attribution race

The restart-trigger subtest occasionally fails on CI with:

    + assert_eq 0 1
    FAIL: expected: '1' actual: '0'

even though the timer fires correctly and the echo message is in fact
written to the journal. The failure happens because the test relies on
`journalctl --unit=$UNIT_NAME` to find the message, and that filter is
based on the cgroup journald looks up for the writer PID at the time
the stdout message is received.

For very short-lived processes spawned via systemd-executor (like
`echo`), that lookup is racy: the writer's `/proc/$PID/cgroup` can
still resolve to `/init.scope` (systemd-executor's own cgroup) rather
than the service's cgroup, so the message ends up attributed to
`init.scope` and `--unit=` filtering misses it.

    __CURSOR=s=6f90ff5b6a0e47c3a527a9b4892af965;i=f8ed;b=3dad0cc689a04781879e4dd846d24432;m=17703dc;t=6513be1be2506;x=8d3009a687724b5e
    __REALTIME_TIMESTAMP=1778167492519174
    __MONOTONIC_TIMESTAMP=24576988
    __SEQNUM=63725
    __SEQNUM_ID=6f90ff5b6a0e47c3a527a9b4892af965
    _BOOT_ID=3dad0cc689a04781879e4dd846d24432
    _HOSTNAME=H
    PRIORITY=6
    SYSLOG_FACILITY=3
    _UID=0
    _GID=0
    _CAP_EFFECTIVE=1ffffffffff
    _SYSTEMD_CGROUP=/init.scope
    _SYSTEMD_UNIT=init.scope
    _SYSTEMD_SLICE=-.slice
    _EXE=/usr/lib/systemd/systemd-executor
    _TRANSPORT=stdout
    _COMM=18
    _MACHINE_ID=89ef83adc0bc4a33a83a227201b57203
    _RUNTIME_SCOPE=system
    _PID=816
    _CMDLINE=/usr/lib/systemd/systemd-executor --deserialize 50 --log-level debug,console:info --log-target journal-or-kmsg
    _STREAM_ID=8e8e4166c99e40afaa58bcd04a50a7f4
    SYSLOG_IDENTIFIER=echo
    MESSAGE=Hello from timer 29581

Note _SYSTEMD_UNIT=init.scope / _SYSTEMD_CGROUP=/init.scope on the
echo output: this is what causes `--unit=timer-restart-14362` to
return 0 hits. The test failure logs from the same run confirm this:

    + JOURNAL_TS=1778160292
    + journalctl -p info --since=@1778160292 --unit=timer-restart-14362 '--grep=Hello from timer 29581'
    -- No entries --
    + systemctl restart timer-restart-14362.timer
    ...
    + date '--set=+2 hours'
    Thu May  7 15:24:52 UTC 2026
    + sleep 1
    ...
    echo[816]: Hello from timer 29581
    ...
    ++ journalctl -q -p info --since=@1778160292 --unit=timer-restart-14362 '--grep=Hello from timer 29581'
    ++ wc -l
    + assert_eq 0 1
    FAIL: expected: '1' actual: '0'

For comparison, in a passing local run the same message is attributed
correctly to the service unit (_SYSTEMD_UNIT=timer-restart-24147.service),
so `--unit=` matches.

Work around the underlying journald race in the test by setting an
explicit `SyslogIdentifier=` on the service and matching with `-t` plus
the unique grep pattern: `SyslogIdentifier` is carried over the stdout
stream protocol and is not affected by the cgroup lookup race.

Co-developed-by: Claude Opus 4.7 <noreply@anthropic.com>