]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
10 days agotest: bump disk sizes for some test cases 40583/head
Lennart Poettering [Fri, 6 Feb 2026 11:16:15 +0000 (12:16 +0100)] 
test: bump disk sizes for some test cases

In my testing I switched building my locally run CI integration tests to
ArchLinux and realized that for that the default sizes don't work
anymore, the images are larger than the space allocated. Let's bump the
size by 50% for the relevant disk images.

10 days agotests: don't use "dd" to allocate empty files
Lennart Poettering [Fri, 6 Feb 2026 10:16:48 +0000 (11:16 +0100)] 
tests: don't use "dd" to allocate empty files

Let's use truncate -s … to create empty files (if they can be sparse)

Let's use fallocate -l … to create empty non-sparse files.

This should reduce the disk footprint of our tests a bit, given that in
most cases we won't use the allocate disk space in full, not even
remotely.

10 days agometrics: fix typo
Yu Watanabe [Fri, 6 Feb 2026 06:19:51 +0000 (15:19 +0900)] 
metrics: fix typo

Follow-up for fd73cd6c912a4d31f404d54700654d8398ea8f27.

10 days agoudev: fix typo
Yu Watanabe [Fri, 6 Feb 2026 06:17:21 +0000 (15:17 +0900)] 
udev: fix typo

Follow-up for b7363d33302fa86fe46e03b500e729fea3277ed7.

10 days agojournal-remote test: add -Z for mkdir in general
Cathy Hu [Fri, 23 Jan 2026 09:52:36 +0000 (10:52 +0100)] 
journal-remote test: add -Z for mkdir in general

Otherwise on SELinux enabled systems with the "targeted" policy
the type is not set correctly when run via unconfined user and
the test fails.

10 days agohwdb: several fixes for sensor (#40576)
Yu Watanabe [Fri, 6 Feb 2026 06:13:54 +0000 (15:13 +0900)] 
hwdb: several fixes for sensor (#40576)

Let's respect for some devices that the accelerometer values must follow
the normal orientation of the panel and not the device one.

10 days agopcrextend: fix varlink API to match what we actually take
Lennart Poettering [Thu, 5 Feb 2026 15:01:08 +0000 (16:01 +0100)] 
pcrextend: fix varlink API to match what we actually take

(Change test case slightly, to ensure we don't regress on this)

10 days agoportablectl: Strip .v or .raw.v when extracting prefix
Louis Stagg [Tue, 3 Feb 2026 18:48:59 +0000 (18:48 +0000)] 
portablectl: Strip .v or .raw.v when extracting prefix

This allows a plain "portablectl attach foobar.raw.v" without needing to
specify a prefix.

11 days agohwdb: sensor: remove Asus T101HA and T101HAF 40576/head
David Santamaría Rogado [Thu, 5 Feb 2026 17:06:39 +0000 (18:06 +0100)] 
hwdb: sensor: remove Asus T101HA and T101HAF

T101HA reports corect values in monitor-sensor when no mount matrix is
defined and was added to correct KDE display output.

T101HAF original bug report stated that it corrects the display in KDE
so indeed this is wrong.

11 days agohwdb: sensor: recover Duet 3 10IGL5 normal and LTE
David Santamaría Rogado [Thu, 5 Feb 2026 16:59:54 +0000 (17:59 +0100)] 
hwdb: sensor: recover Duet 3 10IGL5 normal and LTE

The mount matrix was as intended, normal is when the device is in panel
orientation, not in device orientation.

11 days agohwdb: sensor: correct D330 respecting panel mount
David Santamaría Rogado [Thu, 5 Feb 2026 15:08:22 +0000 (16:08 +0100)] 
hwdb: sensor: correct D330 respecting panel mount

The matrix before was setting accel values to follow normal device
orientation, but the accel values must match the panel orientation that
in these devices is 90 degrees CCW.

Indicate how the panel is mounted in the comment. Could be interesting
to do it also for other devices because when desktop enviroments do it
right the user could be unaware of the panel mounting and could think
monitor-sensor output is bogus.

11 days agostat-util: introduce xstatx() (#40507)
Mike Yuan [Thu, 5 Feb 2026 15:51:57 +0000 (16:51 +0100)] 
stat-util: introduce xstatx() (#40507)

11 days agoupdate TODO
Lennart Poettering [Thu, 29 Jan 2026 11:11:40 +0000 (12:11 +0100)] 
update TODO

11 days agoVarious fixes related to mountfsd (#40564)
Daan De Meyer [Thu, 5 Feb 2026 15:39:28 +0000 (16:39 +0100)] 
Various fixes related to mountfsd (#40564)

11 days agopidfd-util: Remove unused include
Daan De Meyer [Thu, 5 Feb 2026 14:32:40 +0000 (15:32 +0100)] 
pidfd-util: Remove unused include

This snuck in when CI was broken.

11 days agonsresourced: Ensure that all user namespaces are cleaned-up
Christian Brauner [Wed, 4 Feb 2026 22:24:31 +0000 (23:24 +0100)] 
nsresourced: Ensure that all user namespaces are cleaned-up

The code here assumes that free_user_ns() is called for every single
user namespace. That however has never been the case and the logic for
free_user_ns() is a bit more involved.

A nested user namespace pins its parent user namespace. IOW, the
lifetime of the parent user namespaces is at least as long as the child
user namespaces.

If a parent user namespace becomes unused (no namespace file descriptors
or task using it anymore) then it will stick around and its lifetime
still bound to the child user namespace.

free_user_ns() takes advantage of that behavior. If a child user
namespace is freed and its parent user namespace is already unused then
then free_user_ns() will free both the child and the parent user
namespace. This means a single free_user_ns() frees two user namespaces.
Hence, the bpf program never sees the parent user namespace being freed.

We can fix this by piggy-backing on another function that is called for
every single user namespace being freed. This requires CONFIG_SYSCTL but
systemd doesn't work without that anyway.

The return type needs to change to a scalar type as required by libbpf.

Long-term what we need is appropriate LSM infrastructure for this
including hooks that get called on namespace destruction.

Thanks to Daan DeMeyer for figuring out that the cast is needed.

Signed-off-by: Christian Brauner <brauner@kernel.org>
11 days agonsresourced: Add comment about mknod() hook covering regular files 40564/head
Daan De Meyer [Mon, 26 Jan 2026 20:39:34 +0000 (21:39 +0100)] 
nsresourced: Add comment about mknod() hook covering regular files

11 days agonsresourced: Fix typo
Daan De Meyer [Sun, 25 Jan 2026 20:21:22 +0000 (21:21 +0100)] 
nsresourced: Fix typo

11 days agomountfsd: Always open_tree() in mount namespace of peer
Daan De Meyer [Sat, 24 Jan 2026 19:52:14 +0000 (20:52 +0100)] 
mountfsd: Always open_tree() in mount namespace of peer

open_tree() will fail with EINVAL when passed a directory file descriptor
that comes from another mount namespace. While this should be fixed in a
future kernel, let's workaround the issue for now by entering the mount
namespace of the peer if needed and calling open_tree() there and then
passing the fd back to the mountfsd process.

11 days agoudev: fix performance regression in resolving event dependencies (#40364)
Daan De Meyer [Thu, 5 Feb 2026 13:14:47 +0000 (14:14 +0100)] 
udev: fix performance regression in resolving event dependencies (#40364)

Fixes #39583.
Fixes #39817.

11 days agostat-util: drop now unused statx_warn_mount_{id,root}() 40507/head
Mike Yuan [Thu, 29 Jan 2026 09:59:42 +0000 (10:59 +0100)] 
stat-util: drop now unused statx_warn_mount_{id,root}()

11 days agovarious: use xstatx()
Mike Yuan [Thu, 29 Jan 2026 09:48:43 +0000 (10:48 +0100)] 
various: use xstatx()

11 days agoREADME: list STATX_MNT_ID_UNIQUE and AT_HANDLE_MNT_ID_UNIQUE
Mike Yuan [Thu, 5 Feb 2026 04:37:29 +0000 (05:37 +0100)] 
README: list STATX_MNT_ID_UNIQUE and AT_HANDLE_MNT_ID_UNIQUE

11 days agomountpoint-util: rework name_to_handle_at() unique mount id handling
Mike Yuan [Thu, 5 Feb 2026 00:32:59 +0000 (01:32 +0100)] 
mountpoint-util: rework name_to_handle_at() unique mount id handling

name_to_handle_at_try_unique_mntid_fid() in its current form is
ill-designed for various reasons:

* AT_HANDLE_FID requires file system support, while unique mount id
  is a VFS concept hence is always available if supported. Hence
  the fallback for AT_HANDLE_MNT_ID_UNIQUE should be independent
  of fid.
* The request for AT_HANDLE_MNT_ID_UNIQUE can be identified via
  specifying ret_unique_mnt_id, no need for opening up the control
  to caller (and currently the function simply doesn't handle
  mismatch between ret params and flags).
* The caller cannot realistically differentiate whether the returned
  mount id is actually unique.
* The path_get_unique_mnt_id() fallback did not handle AT_SYMLINK_FOLLOW.

Let's instead move the statx() fallback into name_to_handle_at_loop()
directly, and revamp interaction of ret_mnt_id/ret_unique_mnt_id:
if both are set, it indicates that the caller can handle both, hence
set what we have and return 0/1 for whether we managed to acquire
the unique one.

The !ret_handle && ret_mnt_id logic is removed. Let's not rely on
undocumented bizaare behavior and it's unused anyways.
path_get_mnt_id_at() exists for a reason...

11 days agomountpoint-util: port to xstatx(), support XAT_FDROOT
Mike Yuan [Thu, 29 Jan 2026 09:20:00 +0000 (10:20 +0100)] 
mountpoint-util: port to xstatx(), support XAT_FDROOT

11 days agostat-util: introduce xstatx()
Mike Yuan [Thu, 29 Jan 2026 08:23:35 +0000 (09:23 +0100)] 
stat-util: introduce xstatx()

11 days agobasic: add generated statx_mask_one_to_name()/statx_attribute_to_name()
Mike Yuan [Wed, 4 Feb 2026 22:30:42 +0000 (23:30 +0100)] 
basic: add generated statx_mask_one_to_name()/statx_attribute_to_name()

11 days agofd-util: add generic resolve_xat_fdroot()
Mike Yuan [Thu, 29 Jan 2026 10:27:40 +0000 (11:27 +0100)] 
fd-util: add generic resolve_xat_fdroot()

As suggested in
https://github.com/systemd/systemd/pull/40500#discussion_r2740921215

11 days agoshared/find-esp: STATX_MNT_ID is no longer needed as we rely on _ATTR_MOUNT_ROOT
Mike Yuan [Thu, 29 Jan 2026 09:49:56 +0000 (10:49 +0100)] 
shared/find-esp: STATX_MNT_ID is no longer needed as we rely on _ATTR_MOUNT_ROOT

Follow-up for a98a6eb95cc980edab4b0f9c59e6573edc7ffe0c

11 days agoportable-util: drop spurious -ENXIO check for xdg_user_config_dir()
Mike Yuan [Mon, 2 Feb 2026 09:50:40 +0000 (10:50 +0100)] 
portable-util: drop spurious -ENXIO check for xdg_user_config_dir()

Unlike $XDG_RUNTIME_DIR the user config dir has a default
value, hence -ENXIO is not really expected.

11 days agoboot/efi-string: use QUOTES macro, shorten the code a bit
Mike Yuan [Wed, 4 Feb 2026 18:32:51 +0000 (19:32 +0100)] 
boot/efi-string: use QUOTES macro, shorten the code a bit

Follow-up for a8f2f5d71786c2cf36e32f856cc329413a76cd93

11 days agotest-uid-range: Migrate to new assertion macros
Daan De Meyer [Sun, 25 Jan 2026 08:33:00 +0000 (09:33 +0100)] 
test-uid-range: Migrate to new assertion macros

11 days agonamespace-util: Fix logging in userns_enter_and_pin()
Daan De Meyer [Fri, 23 Jan 2026 18:15:15 +0000 (19:15 +0100)] 
namespace-util: Fix logging in userns_enter_and_pin()

11 days agomkosi: update mkosi ref to 215a9497ccc089ba030da39e15e9e2371efad3cb (#40573)
Daan De Meyer [Thu, 5 Feb 2026 13:06:45 +0000 (14:06 +0100)] 
mkosi: update mkosi ref to 215a9497ccc089ba030da39e15e9e2371efad3cb (#40573)

215a9497cc fedora: Use N-1 key as well when querying rawhide GPG key
842a37ed6c Add MakeScriptsExecutable= setting to optionally try to
make scripts executable before bailing out
814f2004bb build(deps): bump github/codeql-action from 4.31.9 to
4.32.0
d8f4f628bf build(deps): bump actions/checkout from 6.0.1 to 6.0.2
3e55361142 docs: remove superfluous definition colon
5901524c48 mkosi-tools: add libarchive-tools package.
968392f1b9 docs: Add information about gui mkosi-tools profile
0e2960c245 Add missing call to run_locale_gen()
41cd2067bc rpm: Set pkgverify_level to digest
86fe0f448a dnf: Give advanced users some control over plugins
50a1feee52 run: Improve sandbox command logging
b1dffe1c3c Fix environment variable name for systemd-repart
07726068d9 Allow specifying "default" value for Initrds=
704f163ec0 Allow setting PORTABLE_PREFIXES= via Environment=
e6588afb45 opensuse: More GPG key handling fixes
c367f993dd opensuse: Fetch remote keys as well if RepositoryKeyFetch=
is enabled
31852c9314 ci: Use mkosi box for unit test CI as well
e4229f5bf5 Make sure we pass the right context to
finalize_default_initrd()
9b431b783a tools: don't pull in virtiofsd in bookworm tools trees
ae2d88d463 build(deps): bump github/codeql-action from 4.31.6 to
4.31.9
933401a8b6 build(deps): bump actions/checkout from 6.0.0 to 6.0.1
6bfeb4ac86 opensuse: Import GPG keys for all repositories
9829b9136f Add support for locale-gen
63ae86ec04 nixos: Use repository key fetching by default on nixos
f01ca9904b docs: Reword dependencies vs tools tree requirement a bit
ab47ba25ef docs: Minor correction on enabling unprivileged namespaces
7bd46a417e docs: Update unprivileged user namespace docs

11 days agomkosi: update mkosi ref to 14d2d37a1923c03062f55454b2b61d0c64db6238 40573/head
Daan De Meyer [Thu, 5 Feb 2026 12:10:35 +0000 (13:10 +0100)] 
mkosi: update mkosi ref to 14d2d37a1923c03062f55454b2b61d0c64db6238

14d2d37a19 sandbox: Make sure we're dumpable before writing uidmap files
215a9497cc fedora: Use N-1 key as well when querying rawhide GPG key
842a37ed6c Add MakeScriptsExecutable= setting to optionally try to make scripts executable before bailing out
814f2004bb build(deps): bump github/codeql-action from 4.31.9 to 4.32.0
d8f4f628bf build(deps): bump actions/checkout from 6.0.1 to 6.0.2
3e55361142 docs: remove superfluous definition colon
5901524c48 mkosi-tools: add libarchive-tools package.
968392f1b9 docs: Add information about gui mkosi-tools profile
0e2960c245 Add missing call to run_locale_gen()
41cd2067bc rpm: Set pkgverify_level to digest
86fe0f448a dnf: Give advanced users some control over plugins
50a1feee52 run: Improve sandbox command logging
b1dffe1c3c Fix environment variable name for systemd-repart
07726068d9 Allow specifying "default" value for Initrds=
704f163ec0 Allow setting PORTABLE_PREFIXES= via Environment=
e6588afb45 opensuse: More GPG key handling fixes
c367f993dd opensuse: Fetch remote keys as well if RepositoryKeyFetch= is enabled
31852c9314 ci: Use mkosi box for unit test CI as well
e4229f5bf5 Make sure we pass the right context to finalize_default_initrd()
9b431b783a tools: don't pull in virtiofsd in bookworm tools trees
ae2d88d463 build(deps): bump github/codeql-action from 4.31.6 to 4.31.9
933401a8b6 build(deps): bump actions/checkout from 6.0.0 to 6.0.1
6bfeb4ac86 opensuse: Import GPG keys for all repositories
9829b9136f Add support for locale-gen
63ae86ec04 nixos: Use repository key fetching by default on nixos
f01ca9904b docs: Reword dependencies vs tools tree requirement a bit
ab47ba25ef docs: Minor correction on enabling unprivileged namespaces
7bd46a417e docs: Update unprivileged user namespace docs

11 days agofetch-mkosi: Shorten commit message title
Daan De Meyer [Thu, 5 Feb 2026 09:53:09 +0000 (10:53 +0100)] 
fetch-mkosi: Shorten commit message title

Currently github truncates the message so let's make it a little shorter
so it's not truncated.

11 days agosleep: allow HibernateDelaySec and low-battery hibernation to work together
gvenugo3 [Tue, 3 Feb 2026 03:57:30 +0000 (20:57 -0700)] 
sleep: allow HibernateDelaySec and low-battery hibernation to work together

Previously, setting HibernateDelaySec= would disable ACPI battery trip
point (_BTP) alarms, forcing the system to rely solely on software
polling for battery checks. This could result in the battery draining
to 0% between polling intervals, causing data loss.

Now, when ACPI _BTP is available AND HibernateDelaySec= is set, both
mechanisms work together. The system will hibernate on whichever comes
first: low battery (instant hardware alarm) or the configured timeout.

This also properly respects HibernateOnACPower=no by resetting the
timer while on AC power, matching the documented behavior.

Fixes: https://github.com/systemd/systemd/issues/26498
11 days agoInitial tweaks for the report tool (#40568)
Zbigniew Jędrzejewski-Szmek [Thu, 5 Feb 2026 09:15:39 +0000 (10:15 +0100)] 
Initial tweaks for the report tool (#40568)

12 days agometrics/report: add log messages, do not hang if no metrics are found 40568/head
Zbigniew Jędrzejewski-Szmek [Wed, 4 Feb 2026 17:20:11 +0000 (18:20 +0100)] 
metrics/report: add log messages, do not hang if no metrics are found

If the directory existed but was empty, we'd hang in the event loop.

12 days agometrics/report: use _cleanup_, avoid goto
Zbigniew Jędrzejewski-Szmek [Wed, 4 Feb 2026 16:57:24 +0000 (17:57 +0100)] 
metrics/report: use _cleanup_, avoid goto

12 days agopid1: shorten message about jobs skipped after failed condition checks
Zbigniew Jędrzejewski-Szmek [Wed, 4 Feb 2026 09:21:43 +0000 (10:21 +0100)] 
pid1: shorten message about jobs skipped after failed condition checks

I was looking at some logs on a console, and because of the lengthy message,
the actually interesting part, i.e. what condition failed, didn't even fit
on the screen. Let's make the sentence legible but brief.

12 days ago[metrics] Introduce metrics API (#39202)
Zbigniew Jędrzejewski-Szmek [Wed, 4 Feb 2026 15:31:55 +0000 (16:31 +0100)] 
[metrics] Introduce metrics API (#39202)

See the [design
doc](https://github.com/systemd/systemd/issues/38023#issue-3192567450)
by @ikruglov

This PR introduces the metrics API framework, adds some basic system
wide/per unit/service metrics, and a basic CLI. The PR is broken into
two commits as described below.

### Deviations from the original design
- Introduced top level field "object" for ease of filtering. Instead of
having `fields: { unit: "foo", unit_type: "service" }`, we now have
`object: foo.service` as the top level field.

### First commit

The first commit includes:
- Metrics API definitions
- Code to set up the varlink server
- The describe method which shows all the metrics families
- The list method which lists all the metrics
- Type definitions related to MetricFamily
- Common code to build json objects

### Second commit
The second commit adds some basic metrics, a basic CLI (systemd-report)
which
lists the metrics, and integration tests.

**System wide metrics:**
- units_by_type_total
- units_by_state_total

**Two per unit metrics:**
- unit_active_state
- unit_load_state

**A service state metric:**
- nrestarts

### Sample outputs

**units_by_type_total**:

```
{
        "name" : "io.systemd.Manager.units_by_type_total",
        "value" : 52,
        "fields" : {
                "type" : "target"
        }
}
{
        "name" : "io.systemd.Manager.units_by_type_total",
        "value" : 82,
        "fields" : {
                "type" : "device"
        }
}
{
        "name" : "io.systemd.Manager.units_by_type_total",
        "value" : 2,
        "fields" : {
                "type" : "automount"
        }
}
```
**units_by_state_total**:
```
{
        "name" : "io.systemd.Manager.units_by_state_total",
        "value" : 216,
        "fields" : {
                "state" : "active"
        }
}
{
        "name" : "io.systemd.Manager.units_by_state_total",
        "value" : 0,
        "fields" : {
                "state" : "reloading"
        }
}
{
        "name" : "io.systemd.Manager.units_by_state_total",
        "value" : 120,
        "fields" : {
                "state" : "inactive"
        }
}
```
**unit_active_state**:
```
{
        "name" : "io.systemd.Manager.unit_active_state",
        "object" : "multi-user.target",
        "value" : "active"
}
{
        "name" : "io.systemd.Manager.unit_active_state",
        "object" : "systemd-sysusers.service",
        "value" : "inactive"
}
```
**unit_load_state**:
```
{
        "name" : "io.systemd.Manager.unit_load_state",
        "object" : "multi-user.target",
        "value" : "loaded"
}

```
**nrestarts**:
```
{
        "name" : "io.systemd.Manager.nrestarts",
        "object" : "user@0.service",
        "value" : 0
}
{
        "name" : "io.systemd.Manager.nrestarts",
        "object" : "user-runtime-dir@0.service",
        "value" : 0
}
```

12 days agoefi-string: Unquote single-quoted strings as well as double
James Le Cuirot [Tue, 27 Jan 2026 17:12:34 +0000 (17:12 +0000)] 
efi-string: Unquote single-quoted strings as well as double

This code is used to read data copied from /etc/os-release. According to
the spec[1], values can be enclosed in single quotes or double quotes.
Not handling single quotes results in the quotes appearing in the
systemd-boot menu, e.g. 'Gentoo Linux'.

[1] https://www.freedesktop.org/software/systemd/man/latest/os-release.html

Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
12 days agobash-completion/vmspawn: add -x/--ephemeral
Yu Watanabe [Wed, 4 Feb 2026 06:47:44 +0000 (15:47 +0900)] 
bash-completion/vmspawn: add -x/--ephemeral

Follow-up for 6e67fc2938ad690a065a984c5813c6b5c0e48806.

12 days agonetworkd-json: add human-readable address strings for IP addresses
gvenugo3 [Fri, 23 Jan 2026 02:38:30 +0000 (19:38 -0700)] 
networkd-json: add human-readable address strings for IP addresses

Add JSON_BUILD_PAIR_IN_ADDR_WITH_STRING, JSON_BUILD_PAIR_IN6_ADDR_WITH_STRING,
and JSON_BUILD_PAIR_IN4_ADDR_WITH_STRING macros (plus _NON_NULL variants) that
emit both the binary address array and a human-readable string representation.

For example, an address field now emits both:
  "Address": [192, 168, 1, 1]
  "AddressString": "192.168.1.1"

This improves usability of the JSON/Varlink output for debugging and tooling
that consumes networkd state.

Updated networkd-json.c to use these new macros for addresses, neighbors,
nexthops, routes, routing policy rules, DNS servers, NTP servers, SIP servers,
domains, DHCPv6 prefixes, and link-local addresses.

Also updated the Varlink interface definitions to include the new string fields.

12 days agosysext: Skip refresh if no changes are found (#39980)
Lennart Poettering [Wed, 4 Feb 2026 09:30:10 +0000 (10:30 +0100)] 
sysext: Skip refresh if no changes are found (#39980)

When the extensions for the final system are already set up from the
    initrd we should avoid disrupting the boot process with the remount
    (which currently isn't atomic) and the daemon reload for
systemd-confext and systemd-sysext. Similarly, when sysupdate ran and
updated extensions it's best to avoid the remount and daemon reload if
    no changes are found.
    To do this, encode the current extension state in more detail than
    before where only the names of the extensions where encoded in the
overlay mount. This can also be used to provide more details about the
    extension origin in "systemd-sysext status (--json=)". During the
refresh add a check whether the old state matches the new state and in
    this case skip the refresh unless the user provides a flag to always
    refresh. Besides the extension name and the resolved path the best
method for identification is the verity hash but that is not available
for plain image files or directories. Therefore, also include data to
check for file/directory replacements. The creation/modification times
are not always real on reproducible images or extracted archive content.
    The file handle together with the unique mount ID is the next best
identifier we can use when we have no verity hash. Fall back to an inode
when we get no handle. With the creation/modification time and the path
this should be good enough. Using a unique mount ID is important (with
a fallback to the regular non-unique mount ID) instead of st_dev because
    st_dev gets reused too easily, e.g., by a loop device mount and the
mount ID helps to catch this. For the mount ID to be valid it has to be
resolved before we enter the new mount namespace. Thus, it gets provided
    by the image dissect logic and handed over to the sysext subprocess
    which runs in a new mount namespace.
    Luckily, we can rule out online modification of directories or image
files because this is anyway not well supported with overlay mounts, so
we don't do a file checksum nor do we recurse into a directory to look
    for the most recently touched files.  But, as said, with the
    always-refresh flag one can force a reload.

12 days agoudev: do not build full list of dependencies 40364/head
Yu Watanabe [Fri, 16 Jan 2026 19:14:05 +0000 (04:14 +0900)] 
udev: do not build full list of dependencies

Suppose the following dependent events are queued:

A(1000) -> C(1002)
                   \
                     --> E(1004)
                   /
B(1001) -> D(1003)

Here, each number is the seqnum of the event, and A -> B means that
event B depends on event A, that is, event B cannot be started until
event A is processed.

In this case, to know if event E can be started, we only need to check
if event C and D are processed, and not necessary to check the state of
event A or B.

However, the commit e1ae931064be9483aa98249294f6e195537f43d1 introduced
full dependency list (in the above example, all A, B, C, D are listed as
the blocker for E), but it is overkill and most information is not necessary.
Also, before the commit e1ae931064be9483aa98249294f6e195537f43d1, we
found blocker from the beginning of the queued events, but that's also
not necessary, as even A is processed, still C may be queued, and we
anyway need to check if C is processed or not.

This makes each event only stores the last blocker event for the event,
and finds the blocker from the end of the queue. With this change, the
memory cost can be reduced from O(n^2) to O(n). Also, as previously we
used Set for managing blockers, but now we only increment/decrement
the reference counter of events, so the speed should be also improved.

Fixes #39583 and #39817.

12 days agoudev: move functions
Yu Watanabe [Wed, 21 Jan 2026 03:32:50 +0000 (12:32 +0900)] 
udev: move functions

Nothing changed except for the functions are moved.
Preparation for the next commit, where worker_detach_event() will be
used in on_worker_exit().

12 days agoresolvectl: re-implement normal status output using varlink (#40529)
Yu Watanabe [Wed, 4 Feb 2026 06:47:02 +0000 (15:47 +0900)] 
resolvectl: re-implement normal status output using varlink (#40529)

Currently, `resolvectl status` (and other status commands like
`resolvectl dns $iface`) uses varlink when asked to print JSON, but uses
dbus otherwise. This PR re-implements the regular status output to use
varlink instead of dbus.

This both simplifies the `resolvectl status` code, and is an incremental
step in replacing dbus usage with varlink throughout `resolvectl`.

The first several commits move `dns-configuration.[ch]` from
`src/network/wait-online` to `src/shared`, and complete the JSON
dispatching so that all fields are available in a concrete type. The
next few commits re-implement global, link, and delegate status output.
Finally, the last commits consolidate and simplify the status logic
since varlink and the `DNSConfiguration` type can be used in all cases.

12 days agovmspawn: add --ephemeral (#40505)
Yu Watanabe [Wed, 4 Feb 2026 02:43:22 +0000 (11:43 +0900)] 
vmspawn: add --ephemeral (#40505)

This PR implements --ephemeral for vmspawn in the same way as nspawn.

Note that this does not support snapshots for --extra-drives.

12 days agosysext: Skip refresh if no changes are found 39980/head
Kai Lueke [Tue, 25 Nov 2025 15:04:43 +0000 (00:04 +0900)] 
sysext: Skip refresh if no changes are found

When the extensions for the final system are already set up from the
initrd we should avoid disrupting the boot process with the remount
(which currently isn't atomic) and the daemon reload for
systemd-confext and systemd-sysext. Similarly, when sysupdate ran and
updated extensions it's best to avoid the remount and daemon reload if
no changes are found.
To do this, encode the current extension state in more detail than
before where only the names of the extensions where encoded in the
overlay mount. This can also be used to provide more details about the
extension origin in "systemd-sysext status (--json=)". During the
refresh add a check whether the old state matches the new state and in
this case skip the refresh unless the user provides a flag to always
refresh. Besides the extension name and the resolved path the best
method for identification is the verity hash but that is not available
for plain image files or directories. Therefore, also include data to
check for file/directory replacements. The creation/modification times
are not always real on reproducible images or extracted archive content.
The file handle together with the unique mount ID is the next best
identifier we can use when we have no verity hash. Fall back to an inode
when we get no handle. With the creation/modification time and the path
this should be good enough. Using a unique mount ID is important (with
a fallback to the regular non-unique mount ID) instead of st_dev because
st_dev gets reused too easily, e.g., by a loop device mount and the
mount ID helps to catch this. For the mount ID to be valid it has to be
resolved before we enter the new mount namespace. Thus, it gets provided
by the image dissect logic and handed over to the sysext subprocess
which runs in a new mount namespace.
Luckily, we can rule out online modification of directories or image
files because this is anyway not well supported with overlay mounts, so
we don't do a file checksum nor do we recurse into a directory to look
for the most recently touched files.  But, as said, with the
always-refresh flag one can force a reload.

12 days agosysext: Create mutable directory with the right mode
Kai Lueke [Tue, 2 Dec 2025 15:02:32 +0000 (00:02 +0900)] 
sysext: Create mutable directory with the right mode

When the mutable directory didn't exist but gets created with
--mutable=yes then it used to get mode 700 and later it got patched by
a chmod because it is the top layer and must match the target hierarchy.
This meant one could not call the function to resolve the mutable
directory twice before the mount because it has a check for a proper
mode when the directory exists which is the case for the second call.
Also, this resulted in /var/lib/extensions.mutable getting created with
mode 700 which is not really required.

Don't rely on the chmod for the upper dir but directly create the
directory with the right mode by first creating all missing directories
with 755 as a sane default and then changing the mode as needed for the
mutable directory.

13 days agoresolvectl: add print_configuration() to consolidate status logic 40529/head
Nick Rosbrook [Fri, 30 Jan 2026 21:04:37 +0000 (16:04 -0500)] 
resolvectl: add print_configuration() to consolidate status logic

There is a lot of duplication across the functions for printing global,
link, and delegate output. Since these all use a common DNSConfiguration
type now, the logic can be consolidated.

Adapt printing and format helper functions to accept a DNSConfiguration
parameter to appropriately format output. Then, add print_configuration(),
a single function that prints the appropriate status output based on the
contents of DNSConfiguration.

13 days agoresolvectl: consolidate JSON and regular status output paths
Nick Rosbrook [Fri, 30 Jan 2026 20:10:49 +0000 (15:10 -0500)] 
resolvectl: consolidate JSON and regular status output paths

Now that varlink is always used for status output, consolidate the JSON
and regular status code paths. Add status_full(), which is the single
point that calls DumpDNSConfiguration, filters based on link names and
mode if needed, and prints the output in the appropriate format.

This simplifies status_ifindex(), and removes the need for a separate
status_json().

13 days agoresolvectl: use varlink to report delegate status
Nick Rosbrook [Fri, 30 Jan 2026 19:34:41 +0000 (14:34 -0500)] 
resolvectl: use varlink to report delegate status

This is an incremental commit to replacing dbus usage with varlink for
all status output.

Re-implement regular delegate status output using the DumpDNSConfiguration
varlink method. And, remove the DelegateInfo type and associated functions
which were used to map dbus properties.

Since this is the last type of status output to be switched to varlink,
lots of other code becomes dead with these changes, e.g.
read_dns_server_one(), map_dns_servers_internal(), etc., so remove those
too. Finally, status_all() no longer needs sd_bus, so drop that
parameter.

13 days agoresolvectl: use varlink to report link status
Nick Rosbrook [Fri, 30 Jan 2026 19:34:41 +0000 (14:34 -0500)] 
resolvectl: use varlink to report link status

This is an incremental commit to replacing dbus usage with varlink for
all status output.

Re-implement regular link status output using the DumpDNSConfiguration
varlink method. And, remove the LinkInfo type and associated functions
which were used to map dbus properties.

13 days agoresolvectl: use varlink to report global status
Nick Rosbrook [Fri, 30 Jan 2026 19:34:38 +0000 (14:34 -0500)] 
resolvectl: use varlink to report global status

This is an incremental commit to replacing dbus usage with varlink for
all status output.

Re-implement regular global status output using the DumpDNSConfiguration
varlink method. And, remove the GlobalInfo type and associated functions
which were used to map dbus properties.

13 days agodns-configuration: use OrderedSet for servers and domains
Nick Rosbrook [Fri, 30 Jan 2026 19:34:34 +0000 (14:34 -0500)] 
dns-configuration: use OrderedSet for servers and domains

This only has a small effect, which mostly matters for generating status
output. It ensures that the order of servers and domains displayed
matches the order they are stored on the daemon side, which keeps the
new resolvectl output consistent with the old.

13 days agodns-configuration: add DNSSEC support boolean to DNSConfiguration
Nick Rosbrook [Fri, 30 Jan 2026 19:34:33 +0000 (14:34 -0500)] 
dns-configuration: add DNSSEC support boolean to DNSConfiguration

This is one of several commits to dispatch all fields of the
DNSConfiguration JSON.

13 days agodns-configuration: add in_addr_union field to DNSServer type
Nick Rosbrook [Fri, 30 Jan 2026 19:34:28 +0000 (14:34 -0500)] 
dns-configuration: add in_addr_union field to DNSServer type

This makes it easier to use DNSServer with helpers from in-addr-util.h.

13 days agodns-configuration: dispatch delegate name to DNSConfiguration
Nick Rosbrook [Fri, 30 Jan 2026 19:34:27 +0000 (14:34 -0500)] 
dns-configuration: dispatch delegate name to DNSConfiguration

This is one of several commits to dispatch all fields of the
DNSConfiguration JSON.

13 days agodns-configuration: dispatch scopes to DNSConfiguration
Nick Rosbrook [Fri, 30 Jan 2026 19:34:23 +0000 (14:34 -0500)] 
dns-configuration: dispatch scopes to DNSConfiguration

This is one of several commits to dispatch all fields of the
DNSConfiguration JSON.

Introduce a DNSScope type, and all required JSON dispatching helpers.

13 days agodns-configuration: dispatch resolv conf mode to DNSConfiguration
Nick Rosbrook [Fri, 30 Jan 2026 19:34:22 +0000 (14:34 -0500)] 
dns-configuration: dispatch resolv conf mode to DNSConfiguration

This is one of several commits to dispatch all fields of the
DNSConfiguration JSON.

13 days agodns-configuration: dispatch negative trust anchors to DNSConfiguration
Nick Rosbrook [Fri, 30 Jan 2026 19:34:19 +0000 (14:34 -0500)] 
dns-configuration: dispatch negative trust anchors to DNSConfiguration

This is one of several commits to dispatch all fields of the
DNSConfiguration JSON.

13 days agodns-configuration: dispatch fallback servers to DNSConfiguration
Nick Rosbrook [Fri, 30 Jan 2026 19:34:16 +0000 (14:34 -0500)] 
dns-configuration: dispatch fallback servers to DNSConfiguration

This is one of several commits to dispatch all fields of the
DNSConfiguration JSON.

13 days agodns-configuration: dispatch all protocol modes to DNSConfiguration
Nick Rosbrook [Fri, 30 Jan 2026 19:34:15 +0000 (14:34 -0500)] 
dns-configuration: dispatch all protocol modes to DNSConfiguration

This is one of several commits to dispatch all fields of the
DNSConfiguration JSON.

13 days agoshared: move wait-online's dns-configuration.[ch] to shared
Nick Rosbrook [Fri, 30 Jan 2026 19:34:09 +0000 (14:34 -0500)] 
shared: move wait-online's dns-configuration.[ch] to shared

13 days agoresolve: add DNSConfiguration field to indicate DNSSEC support
Nick Rosbrook [Fri, 30 Jan 2026 19:34:03 +0000 (14:34 -0500)] 
resolve: add DNSConfiguration field to indicate DNSSEC support

The varlink API is currently missing the "DNSSEC supported" field, which
is required for to re-implement the existing resolvectl status output
with varlink instead of dbus.

Add this field to DNSConfiguration.

13 days agoIntroduce name_to_handle_at_u64() helper function and use it for getting pidfd ID...
Yu Watanabe [Tue, 3 Feb 2026 19:37:07 +0000 (04:37 +0900)] 
Introduce name_to_handle_at_u64() helper function and use it for getting pidfd ID and cgroup ID (#40500)

13 days agovmspawn: add --ephemeral option similar to nspawn 40505/head
Michael Vogt [Sun, 1 Feb 2026 13:07:40 +0000 (14:07 +0100)] 
vmspawn: add --ephemeral option similar to nspawn

This patch adds a `--ephemeral` option to vmspawn that will turn
on snapshot mode on the qemu disk passed via `--image` or the
directory passed via `--directory`. For disk images it uses the
native mechanism that qemu provides. For directories it (re)uses
the snapshot mechanism that nspawn is using, i.e. it will create
a btrfs snapshot if possible and if not falls back to a traditional
directory copy.

13 days agoPortabled capsule fixes (#40427)
Yu Watanabe [Tue, 3 Feb 2026 17:53:16 +0000 (02:53 +0900)] 
Portabled capsule fixes (#40427)

13 days agocgroup-util: declare file_handle union in cg_cgroupid_open() 40500/head
Yu Watanabe [Wed, 28 Jan 2026 17:16:32 +0000 (02:16 +0900)] 
cgroup-util: declare file_handle union in cg_cgroupid_open()

This also effectively reverts eb2e91b9815bcbc59997c1092d7b52fc18930bff,
as now the object is only used as input, and kernel would need to handle
input with only ID no matter whether the struct later gets extended.

13 days agotree-wide: replace cg_{fd,path}_get_cgroupid() with {fd,path}_to_handle_u64()
Yu Watanabe [Wed, 28 Jan 2026 17:02:56 +0000 (02:02 +0900)] 
tree-wide: replace cg_{fd,path}_get_cgroupid() with {fd,path}_to_handle_u64()

13 days agopidfd-util: use fd_to_handle_u64()
Yu Watanabe [Tue, 3 Feb 2026 15:29:06 +0000 (00:29 +0900)] 
pidfd-util: use fd_to_handle_u64()

13 days agomountpoint-util: introduce name_to_handle_at_u64() and friends
Yu Watanabe [Tue, 3 Feb 2026 15:27:10 +0000 (00:27 +0900)] 
mountpoint-util: introduce name_to_handle_at_u64() and friends

They will be used later.

13 days agomountpoint-util: make name_to_handle_at_loop() gracefully handle NULL path
Yu Watanabe [Tue, 3 Feb 2026 15:07:02 +0000 (00:07 +0900)] 
mountpoint-util: make name_to_handle_at_loop() gracefully handle NULL path

13 days agojournal: avoid strjoina()/newa() (#40489)
Yu Watanabe [Tue, 3 Feb 2026 14:42:23 +0000 (23:42 +0900)] 
journal: avoid strjoina()/newa() (#40489)

Fixes #40456.

13 days agovmspawn/firstboot/homectl: fixes for plymouth (#40558)
Yu Watanabe [Tue, 3 Feb 2026 14:38:38 +0000 (23:38 +0900)] 
vmspawn/firstboot/homectl: fixes for plymouth (#40558)

13 days agoudev: create /run/udev/queue file earlier (#40518)
Yu Watanabe [Tue, 3 Feb 2026 14:36:28 +0000 (23:36 +0900)] 
udev: create /run/udev/queue file earlier (#40518)

When udevd received a uevent or inotify event, then we will queue
events. To minimize the race between processing these events by udevd
and user invocation of 'udevadm settle', let's create /run/udev/queue
file earlier.
On some errors, no event may be queued, but in that case, the file will
be removed by the post event source if nothing queued. See on_post().

Hopefully mitigate the issue #40499.

13 days agoportable: Don't refuse copying out instance of template that exists 40427/head
Daan De Meyer [Fri, 16 Jan 2026 20:25:10 +0000 (21:25 +0100)] 
portable: Don't refuse copying out instance of template that exists

There's no reason to refuse copying out capsule@abc.service even if
capsule@.service already exists on the host, so let's optionally not
search for templates if we can't find an instance when looking up
units and use it in portabled.

13 days agotree-wide: Allow running capsules as any user
Daan De Meyer [Fri, 16 Jan 2026 20:23:11 +0000 (21:23 +0100)] 
tree-wide: Allow running capsules as any user

For many use cases DynamicUser= just doesn't cut it. Specifically lots
of stuff wants to run as root. Let's support this use case by relaxing
our checks for capsules a bit.

13 days agocore: Improve logging when we cannot create destination mountpoint
Daan De Meyer [Fri, 16 Jan 2026 20:21:06 +0000 (21:21 +0100)] 
core: Improve logging when we cannot create destination mountpoint

If we fail to create a parent directory, then the error from
make_mount_point_inode_from_path() will always be
"No such file or directory" which doesn't tell us anything. Add logging
for the mkdir_parents() call as well so we get a useful error.

13 days agojournal: check validity of PID field in syslog/kmsg earlier 40489/head
Yu Watanabe [Wed, 28 Jan 2026 04:23:50 +0000 (13:23 +0900)] 
journal: check validity of PID field in syslog/kmsg earlier

Then, let's make syslog_parse_identifier() returns PID as pid_t, rather
than the string.

This also makes the function refuse ridiculously long identifier.

Fixes #40456.
Fixes oss-fuzz#477990732 (https://issues.oss-fuzz.com/issues/477990732).

13 days agoparse-util: rename trivial argument for parse_pid()
Yu Watanabe [Wed, 28 Jan 2026 03:37:56 +0000 (12:37 +0900)] 
parse-util: rename trivial argument for parse_pid()

The function parse_pid() trivially returns pid, hence it is not
necessary to name the argument for storing result as 'ret_pid'.

13 days agojournal: check the length of timestamp field in syslog message
Yu Watanabe [Wed, 28 Jan 2026 04:41:28 +0000 (13:41 +0900)] 
journal: check the length of timestamp field in syslog message

No functional change. Just refactoring and adding assertion.

13 days agojournal: make security label always NUL-terminated
Yu Watanabe [Wed, 28 Jan 2026 03:20:07 +0000 (12:20 +0900)] 
journal: make security label always NUL-terminated

Then, we can drop label_len or label_size arguments at various places.

While doing this, SCM_SECURITY is now ignored when SELinux is disabled
or when it contains embedded NUL.

13 days agofuzz: assume all reproducers as binary
Yu Watanabe [Wed, 28 Jan 2026 04:49:08 +0000 (13:49 +0900)] 
fuzz: assume all reproducers as binary

Even if parsers expect text data, reproducers may not be suitable
for being handled as a text file.

13 days agoudev: create /run/udev/queue file earlier 40518/head
Yu Watanabe [Fri, 30 Jan 2026 11:32:15 +0000 (20:32 +0900)] 
udev: create /run/udev/queue file earlier

When udevd received a uevent or inotify event, we will queue or trigger
synthesized events. To minimize the race between processing these events
by udevd and user invocation of 'udevadm settle', let's create /run/udev/queue
file earlier.
On some errors, no event may be queued, but in that case, the file will
be removed by the post event source if nothing queued. See on_post().

Hopefully mitigate the issue #40499.

13 days agoudev: remember UUIDs of triggered events
Yu Watanabe [Fri, 30 Jan 2026 15:47:31 +0000 (00:47 +0900)] 
udev: remember UUIDs of triggered events

Otherwise, /run/udev/queue file may be removed before udevd receives
the triggered uevents. This avoids the following race:

1. uevent A is being processed,
2. received an inotify event and trigger a synthesized uevent,
3. uevent A has been processed,
4. the uevent queue becomes empty, and /run/udev/queue is removed,
5. received and queued the synthesized uevent, and /run/udev/queue is recreated.

With this patch, /run/udev/queue is not removed in step 4. Hence,
'udevadm settle' will wait for the synthesized event being processed.

This is similar to waiting for child processes that reread partitions
(thus trigger synthetic events) being terminated, but for synthetic
events triggered by the manager.

13 days agoudev/watch: drop redundant argument
Yu Watanabe [Fri, 30 Jan 2026 15:15:29 +0000 (00:15 +0900)] 
udev/watch: drop redundant argument

The arguments dev and target are always same.

13 days agofirstboot/homectl: hide plymouth splashscreen when asking questions 40558/head
Luca Boccassi [Mon, 2 Feb 2026 11:58:19 +0000 (12:58 +0100)] 
firstboot/homectl: hide plymouth splashscreen when asking questions

When plymouth is enabled, the screen gets all garbled when firstboot
runs and asks questions. Disable the splash screen, but only when
actually asking questions.

13 days agogetty: remove --issue-file parameter
Thorsten Kukuk [Mon, 2 Feb 2026 15:06:13 +0000 (16:06 +0100)] 
getty: remove --issue-file parameter

agetty from util-linux is meanwhile following the configuration file
specification for /etc/issue. The usage of "--issue-file" breaks this
on distributions with current util-linux.

13 days agossh-generator: several cleanups (#40556)
Yu Watanabe [Tue, 3 Feb 2026 11:59:18 +0000 (20:59 +0900)] 
ssh-generator: several cleanups (#40556)

13 days agoFollowups for the recent chagnes to stability statements (#40540)
Zbigniew Jędrzejewski-Szmek [Tue, 3 Feb 2026 11:50:39 +0000 (12:50 +0100)] 
Followups for the recent chagnes to stability statements (#40540)

13 days agodocs: update old man page links to the official location 40540/head
Zbigniew Jędrzejewski-Szmek [Mon, 2 Feb 2026 11:12:05 +0000 (12:12 +0100)] 
docs: update old man page links to the official location

13 days agodocs/INCOMPATIBILITIES: describe the new meson option
Zbigniew Jędrzejewski-Szmek [Mon, 2 Feb 2026 11:05:13 +0000 (12:05 +0100)] 
docs/INCOMPATIBILITIES: describe the new meson option

13 days agohomectl: trim some trailing whitespace
Luca Boccassi [Tue, 3 Feb 2026 11:45:13 +0000 (12:45 +0100)] 
homectl: trim some trailing whitespace

13 days agovmspawn: do not pass console=hvc0 in GUI mode
Luca Boccassi [Mon, 2 Feb 2026 10:59:24 +0000 (11:59 +0100)] 
vmspawn: do not pass console=hvc0 in GUI mode

This breaks when using qemu's GUI mode. Follow mkosi's example.

Follow-up for 773ca1def8f79a8509bf0846de9d75902ca31f79

13 days agogithub/linter: disable ENABLE_GITHUB_PULL_REQUEST_SUMMARY_COMMENT and update super...
Yu Watanabe [Tue, 3 Feb 2026 08:44:10 +0000 (17:44 +0900)] 
github/linter: disable ENABLE_GITHUB_PULL_REQUEST_SUMMARY_COMMENT and update super-linter to 8.4.0 (#40554)

13 days agossh-generator: drop unused variable 40556/head
Yu Watanabe [Sat, 31 Jan 2026 06:31:36 +0000 (15:31 +0900)] 
ssh-generator: drop unused variable