]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
2 months agosd-boot: allow setting the `timeout` via SMBIOS 11
Michael Vogt [Wed, 14 Jan 2026 12:09:10 +0000 (13:09 +0100)] 
sd-boot: allow setting the `timeout` via SMBIOS 11

Allow configuring the menu timeout used by sd-boot by setting
`io.systemd.boot.timeout=<value>` as SMBIOS type 11 string.

This takes precedence over the setting from the config file
and the EFI var.

Useful for e.g. integration tests that want to control that
a generic image boots faster.

2 months agotree-wide: lock in all memory pages when mlockall() is utilized, and on demand
Mike Yuan [Sat, 10 Jan 2026 19:46:25 +0000 (20:46 +0100)] 
tree-wide: lock in all memory pages when mlockall() is utilized, and on demand

When employing MCL_FUTURE we don't actually want it to impose
immediate population of malloc()-ed pages. Hence let's set
MCL_ONFAULT everywhere.

Additionally, specify MCL_CURRENT to ensure future memory allocations
on already mapped pages are covered too. (Addresses
https://github.com/systemd/systemd/pull/40319#discussion_r2693726196)

Note that in shutdown the mlockall() is done to avoid keeping swap space
busy, hence a dedicated call w/ MCL_CURRENT and w/o MCL_ONFAULT is made.

2 months agocore: only activate transaction that contain useful jobs
Michal Sekletar [Fri, 9 Jan 2026 16:18:41 +0000 (17:18 +0100)] 
core: only activate transaction that contain useful jobs

If no real jobs were added to the transaction, do not activate it.
The JOB_NOP anchor does not perform any useful work and activating
such transaction only wastes resources.

Fixes #9751

2 months agoman/systemd.service: Expand docs on RestartSteps (#40309)
Zbigniew Jędrzejewski-Szmek [Thu, 15 Jan 2026 10:41:17 +0000 (11:41 +0100)] 
man/systemd.service: Expand docs on RestartSteps (#40309)

2 months agoboot/initrd: fix typo
Mike Yuan [Thu, 15 Jan 2026 10:35:58 +0000 (11:35 +0100)] 
boot/initrd: fix typo

Follow-up for 80ab99d4d200c29727b573df6bccc49cc9dca6a4

2 months agohwdb: add HP EliteBoard Mic mute key mapping
Dirk Su [Thu, 15 Jan 2026 02:23:56 +0000 (10:23 +0800)] 
hwdb: add HP EliteBoard Mic mute key mapping

2 months agoefi: use 'struct iovec' more, pass initrds down with it
Lennart Poettering [Wed, 14 Jan 2026 17:22:29 +0000 (18:22 +0100)] 
efi: use 'struct iovec' more, pass initrds down with it

2 months agomailmap: deduplicate some frequent contributors
Zbigniew Jędrzejewski-Szmek [Tue, 13 Jan 2026 16:34:24 +0000 (17:34 +0100)] 
mailmap: deduplicate some frequent contributors

2 months agodocs: Document practice of using comments for argument names
DaanDeMeyer [Thu, 1 Jan 2026 20:09:26 +0000 (21:09 +0100)] 
docs: Document practice of using comments for argument names

2 months agointegration tests: do not adjust log level of udevd in the test script
Yu Watanabe [Thu, 8 Jan 2026 02:30:19 +0000 (11:30 +0900)] 
integration tests: do not adjust log level of udevd in the test script

Similar to 5c60d3011feac20dcc3c66fe2bcafa0a889e33d1, but for udevd.

2 months agonetwork: drop fallback logic for kernel older than v5.6
Yu Watanabe [Tue, 13 Jan 2026 01:27:41 +0000 (10:27 +0900)] 
network: drop fallback logic for kernel older than v5.6

Now our baseline is kernel v5.10.

2 months agoudev: silence notification failures (#40275)
Zbigniew Jędrzejewski-Szmek [Wed, 14 Jan 2026 15:26:00 +0000 (16:26 +0100)] 
udev: silence notification failures (#40275)

Closes #39943.

2 months agoman: fix copy/paste issue in systemd-vmspawn.xml
Michael Vogt [Wed, 14 Jan 2026 08:01:46 +0000 (09:01 +0100)] 
man: fix copy/paste issue in systemd-vmspawn.xml

The systemd-vmspawn man page has a note that the `--notify-ready`
defaults to "true" and then says that this is unlike "systemd-vmspawn"
where it defaults to "false". This appears to be a copy/paste issue
and here we want "unlike systemd-nspawn".

2 months agoman: drop duplicate "the"
Christian Hesse [Tue, 13 Jan 2026 23:00:01 +0000 (00:00 +0100)] 
man: drop duplicate "the"

2 months agoBump kernel requirements to >= 5.10, and recommend >= 5.14 (#38977)
Yu Watanabe [Tue, 13 Jan 2026 03:18:15 +0000 (12:18 +0900)] 
Bump kernel requirements to >= 5.10, and recommend >= 5.14 (#38977)

Then, this drops several unnecessary code for older kernels.

2 months agobasic: move BPF_JMP_A to override/linux/bpf_insn.h
calm329 [Mon, 12 Jan 2026 18:20:22 +0000 (10:20 -0800)] 
basic: move BPF_JMP_A to override/linux/bpf_insn.h

Move the BPF_JMP_A macro from override/linux/bpf.h to
override/linux/bpf_insn.h. The bpf.h override conflicts with libbpf's
-I/usr/include/bpf/uapi include path. Since bpf_insn.h is not typically
installed at /usr/include/linux/ or /usr/include/bpf/uapi/linux/, the
override works without conflicts.

Fixes #40331

2 months agoprocess-util: drop unnecessary E2BIG error handling 38977/head
Yu Watanabe [Mon, 5 Jan 2026 04:24:44 +0000 (13:24 +0900)] 
process-util: drop unnecessary E2BIG error handling

E2BIG is returned when the kernel does not support CLONE_INTO_CGROUP,
but the flag is supported since kernel v5.7.

2 months agomount-setup: memory_recursiveprot is supported since kernel v5.7
Yu Watanabe [Mon, 5 Jan 2026 04:24:43 +0000 (13:24 +0900)] 
mount-setup: memory_recursiveprot is supported since kernel v5.7

Our baseline on kernel is 5.10. Hence we can unconditionally use it.

2 months agofd-util: drop close_all_fds_by_proc()
Yu Watanabe [Mon, 5 Jan 2026 04:24:42 +0000 (13:24 +0900)] 
fd-util: drop close_all_fds_by_proc()

With the previous commit, now the function is used only on OOM.
In that case, let's do like close_all_fds_without_malloc().

2 months agofd-util: close_range() is available since kernel 5.9
Yu Watanabe [Mon, 5 Jan 2026 04:24:41 +0000 (13:24 +0900)] 
fd-util: close_range() is available since kernel 5.9

Our baseline on kernel is 5.10, hence we can always use it.

2 months agostat-util: STATX_TYPE and STATX_INO should be always set
Yu Watanabe [Mon, 5 Jan 2026 04:24:41 +0000 (13:24 +0900)] 
stat-util: STATX_TYPE and STATX_INO should be always set

2 months agofd-util,mountpoint-util: STATX_MNT_ID is supported since kernel 5.10
Yu Watanabe [Mon, 5 Jan 2026 04:24:40 +0000 (13:24 +0900)] 
fd-util,mountpoint-util: STATX_MNT_ID is supported since kernel 5.10

Our baseline on kernel is 5.10, hence we can assume it works.

2 months agomountpoint-util: make is_mount_point_at() take usual dir_fd + path style arguments
Yu Watanabe [Mon, 5 Jan 2026 04:24:39 +0000 (13:24 +0900)] 
mountpoint-util: make is_mount_point_at() take usual dir_fd + path style arguments

2 months agotree-wide: statx() supports STATX_ATTR_MOUNT_ROOT since kernel 5.8
Yu Watanabe [Mon, 5 Jan 2026 04:24:37 +0000 (13:24 +0900)] 
tree-wide: statx() supports STATX_ATTR_MOUNT_ROOT since kernel 5.8

Our baseline on kernel is 5.10, hence we can unconditionally use it.

2 months agorandom-util: assume getrandom(GRND_INSECURE) works
Yu Watanabe [Mon, 5 Jan 2026 04:24:27 +0000 (13:24 +0900)] 
random-util: assume getrandom(GRND_INSECURE) works

GRND_INSECURE was added in kernel 5.6, and our baseline on kernel is
5.10. Let's assume it always works. Even if it does not work, we have
further fallback logics. So, this should be safe.

2 months agoBump required minimum kernel version to 5.10 and the recommended baseline to 5.14.
Yu Watanabe [Mon, 5 Jan 2026 04:24:21 +0000 (13:24 +0900)] 
Bump required minimum kernel version to 5.10 and the recommended baseline to 5.14.

The previous minimum required version 5.4 will be EOL on 2025-12.
Let's bump the required minimum kernel version to the next LTS release 5.10
(released on 2020-12-13, EOL on 2026-12, CIP support until 2031-01).

The new recommended baseline 5.14 is the version that CentOS 9 uses.
CentOS 9 will EOL on 2027-05.

See also #38608.

2 months agounits: Fix the missing dependency in systemd-pcrproduct
Marc Pervaz Boocha [Sun, 11 Jan 2026 06:28:27 +0000 (11:58 +0530)] 
units: Fix the missing dependency in systemd-pcrproduct

NvPCR need to read from /var/lib/nvpcr and the current unit file is
executed before /var is mounted. This adds the dep back so its always
runs after /var is mounted like systemd-tpm2-setup.service

2 months agostub: Fix NULL pointer deref when there are no initrds
Hans de Goede [Mon, 12 Jan 2026 13:56:36 +0000 (14:56 +0100)] 
stub: Fix NULL pointer deref when there are no initrds

When n_all_initrds == 0, then all_initrds is unmodified from its initial
value of:

_cleanup_free_ struct iovec *all_initrds = NULL;

and in the else block of the "if (n_all_initrds > 1)" the NULL is
dereferenced:

final_initrd = all_initrds[0];

Leading to the stub crashing due to a NULL pointer deref.

Fix this by initializing final_initrd to all 0s and only
running the else block if (n_all_initrds == 1).

2 months agonetwork: ignore -EINVAL from bpf_get_current_comm()
Yu Watanabe [Mon, 12 Jan 2026 10:46:58 +0000 (19:46 +0900)] 
network: ignore -EINVAL from bpf_get_current_comm()

Hopefully fixes #40051.

2 months agotree-wide: use full paths to tools defined in config.h
Antonio Alvarez Feijoo [Mon, 12 Jan 2026 14:54:41 +0000 (15:54 +0100)] 
tree-wide: use full paths to tools defined in config.h

2 months agomachined: Don't insist on 0:0 for the state directory
Daan De Meyer [Mon, 12 Jan 2026 12:16:53 +0000 (13:16 +0100)] 
machined: Don't insist on 0:0 for the state directory

We now support running machined unprivileged, so don't pass in 0:0
as the uid/gid unconditionally but just use the UID/GID we're running
as.

2 months agomkfs-util: set hash_seed to seed derived value for reproducibility
ZauberNerd [Sun, 11 Jan 2026 14:32:33 +0000 (15:32 +0100)] 
mkfs-util: set hash_seed to seed derived value for reproducibility

When creating ext2/ext3/ext4 filesystems, mke2fs generates a random
hash_seed for htree directory indexing. This causes non-reproducible
images even when SOURCE_DATE_EPOCH is set and the same filesystem UUID
is used.

Set the hash_seed explicitly to match the filesystem UUID, ensuring
that repeated builds with the same seed produce bit-for-bit identical
images.

Also add a test case in TEST-58-REPART to verify ext4 reproducibility
by creating the same partition twice and comparing the results.

See https://vdwaa.nl/mkosi-reproducible-arch-images.html

I used claude ai to help me with this change.

2 months agoman: fix indentation
Yu Watanabe [Mon, 12 Jan 2026 09:19:43 +0000 (18:19 +0900)] 
man: fix indentation

2 months agomkosi: /bin/bash -> /usr/bin/env bash
Maximilian Bosch [Sat, 10 Jan 2026 20:13:31 +0000 (21:13 +0100)] 
mkosi: /bin/bash -> /usr/bin/env bash

This is analogous to a change in mkosi[1] with the same motivation: some
scripts are run to bootstrap the distribution tree and are thus running
directly on the host system which may not have `/bin/bash` (e.g. NixOS).

As with the `mkosi` change, do that for each shebang for consistency
reasons.

[1] https://github.com/systemd/mkosi/commit/8d2cd50e5192cada7211724ecff3514f0c85cf0f

3 months agoman/systemd.service: Note RestartSteps only works with RestartSec= set 40309/head
Matthijs Kooijman [Thu, 8 Jan 2026 22:37:08 +0000 (23:37 +0100)] 
man/systemd.service: Note RestartSteps only works with RestartSec= set

Setting Restart=0 seems reasonable to have no delay on the first
restart, if you do not realize this is impossible with an exponential
restart. So explicitly mention that RestartSec must be set.

3 months agoman/systemd.service: Note RestartSteps are exponential
Matthijs Kooijman [Thu, 8 Jan 2026 22:34:03 +0000 (23:34 +0100)] 
man/systemd.service: Note RestartSteps are exponential

3 months agocore: fix typo
Yu Watanabe [Thu, 8 Jan 2026 03:20:19 +0000 (12:20 +0900)] 
core: fix typo

Follow-up for 32614b9aab5a5c9b5be22b635fefdbccef90adc3.

3 months agomeson: do not install standalone binaries if the meson option is disabled
Luca Boccassi [Wed, 7 Jan 2026 18:29:02 +0000 (19:29 +0100)] 
meson: do not install standalone binaries if the meson option is disabled

A recent commit made the standalone binaries always buildable
on demand, but as a side effect due to how 'meson install' works,
they are always built and installed by 'meson install' even
if the standalone-binaries= option is disabled.
Fix it so that 'meson install' only installs them if the
option is explicitly enabled, while still allowing
building them on demand.

Follow-up for 54492552a1ba96e5160a8e9f867e1c49ffc87bc0

3 months agoman: do not manually update man/rules/meson.build
Yu Watanabe [Tue, 6 Jan 2026 18:13:52 +0000 (03:13 +0900)] 
man: do not manually update man/rules/meson.build

Follow-up for 25393c7c907b2c460a8a34d7dc6a1bdbcac8e9d4.

3 months agocore: change mount options settings so that last defined wins (#39449)
Yu Watanabe [Tue, 6 Jan 2026 19:11:29 +0000 (04:11 +0900)] 
core: change mount options settings so that last defined wins (#39449)

3 months agoDrop support for sysvinit scripts (#39770)
Yu Watanabe [Tue, 6 Jan 2026 17:51:53 +0000 (02:51 +0900)] 
Drop support for sysvinit scripts (#39770)

As announced by a few releases now, finally drop support for sysvinit scripts.

3 months agoNEWS: note mount image options rule changes 39449/head
Luca Boccassi [Tue, 6 Jan 2026 17:00:20 +0000 (18:00 +0100)] 
NEWS: note mount image options rule changes

3 months agocore: change mount options settings so that last defined wins
Luca Boccassi [Sat, 25 Oct 2025 17:40:44 +0000 (18:40 +0100)] 
core: change mount options settings so that last defined wins

Currently mount options are handled in such a way that the first
definition for a given partition wins, and documented as such.
Change them so that they behave like other options, and the
last specified wins.
Applies to RootImageOptions=, MountImages= and ExtensionImages=.
Switch from a linked list to an array indexed by the partition
specifier to store them.

3 months agocore: add support for disabling THPs (#39085)
Yu Watanabe [Tue, 6 Jan 2026 16:36:20 +0000 (01:36 +0900)] 
core: add support for disabling THPs (#39085)

Transparent Hugepages (THP) is a Linux kernel feature that manages
memory using larger pages (2MB on x86, compared to the default 4KB). The
main goal is to improve memory management efficiency and system
performance, especially for memory-intensive applications. However, it
can cause drawbacks in some scenarios, such as memory regression and
latency spikes. THP policy is governed for the entire system via
/sys/kernel/mm/transparent_hugepage/enabled.
However, it can be overridden for individual workloads via prctl(2) call.
MemoryTHP= is used to disable THPs at exec-invoke to stop providing THPs
for workloads where the drawbacks outweigh the advantages. When set to
"disable", MemoryTHP= disables THPs completely for the process,
irrespective of global THP controls.

[1] https://man7.org/linux/man-pages/man2/PR_SET_THP_DISABLE.2const.html
[2] https://man7.org/linux/man-pages/man2/madvise.2.html
[3] https://github.com/torvalds/linux/commit/9dc21bbd62edeae6f63e6f25e1edb7167452457b

3 months agohwdb: add matrix for ASUS 2-in-1 T101HA
francescoza6 [Wed, 31 Dec 2025 17:30:54 +0000 (18:30 +0100)] 
hwdb: add matrix for ASUS 2-in-1 T101HA

The matrix tested working in monitor-sensor (06 gen 2026),
corrects accel values and not just display output.

3 months agosrc/test: add unittest for MemoryTHP= 39085/head
Usama Arif [Sun, 21 Sep 2025 19:59:38 +0000 (20:59 +0100)] 
src/test: add unittest for MemoryTHP=

This checks if the prctl is set correctly when the property name
is passed to systemd-run.

3 months agocore: introduce MemoryTHP= unit file setting
Usama Arif [Mon, 15 Sep 2025 12:33:28 +0000 (13:33 +0100)] 
core: introduce MemoryTHP= unit file setting

Transparent Hugepages (THP) is a Linux kernel feature that manages
memory using larger pages (2MB on x86, compared to the default 4KB).
The main goal is to improve memory management efficiency and system
performance, especially for memory-intensive applications.
However, it can cause drawbacks in some scenarios, such as memory
regression and latency spikes. THP policy is governed for the entire
system via /sys/kernel/mm/transparent_hugepage/enabled.
However, it can be overridden for individual workloads via prctl(2)
call.
MemoryTHP= is used to disable THPs at exec-invoke to stop
providing THPs for workloads where the drawbacks outweigh the advantages.
When set to "disable", MemoryTHP= disables THPs completely for the
process, irrespecitive of global THP controls.
When set to "madvise", MemoryTHP= disables THPs for the process except
when specifically madvised by the process with MADV_HUGEPAGE or MADV_COLLAPSE.

3 months agoDrop support for sysvinit scripts 39770/head
Luca Boccassi [Mon, 17 Nov 2025 14:44:18 +0000 (14:44 +0000)] 
Drop support for sysvinit scripts

As announced by a few releases now, finally drop support for
sysvinit scripts.
Keep rc-local generator for now, as it's really a distinct
feature even though from the same era.

3 months agorc-local and sysvinit are independent, adjust meson/units/docs
Luca Boccassi [Mon, 17 Nov 2025 14:58:27 +0000 (14:58 +0000)] 
rc-local and sysvinit are independent, adjust meson/units/docs

They are separate and independent settings, so adjust meson rules
and unit files accordingly. It is possible to enable support for
rc-local script without support for sysvinit scripts, and viceversa.
This will become useful later when sysvinit scripts support is
removed.

3 months agohwdb: Add missing vendor names for older AYANEO devices
Derek J. Clark [Tue, 6 Jan 2026 04:07:21 +0000 (20:07 -0800)] 
hwdb: Add missing vendor names for older AYANEO devices
Adds AYADEVICE and AYA NEO vendor names. Early founders editon and 2021 models used these DMI values instead of AYANEO

3 months agohwdb: Add missing scancodes for Lenovo Legion devices
Derek J. Clark [Tue, 6 Jan 2026 03:01:30 +0000 (19:01 -0800)] 
hwdb: Add missing scancodes for Lenovo Legion devices

Adds missing scancodes for Lenovo Legion Go, Go S, and Go 2. When long
pressing the power button the device should issue a LEFTMETA + F16
combo. The LEFTMETA code fires properly, but the F16 is not mapped.

Go and Go S devices detect as AT Translated Set 2 Keyboard, while Go 2
detects as AT Raw Set 2 Keyboard, hence the multiple entries.

Signed-off-by: Derek J. Clark <derekjohn.clark@gmail.com>
3 months agoman/kernel-install: /proc/cmdline is not used as a fallback in container
Alexis-Emmanuel Haeringer [Mon, 5 Jan 2026 22:03:03 +0000 (23:03 +0100)] 
man/kernel-install: /proc/cmdline is not used as a fallback in container

3 months agoman: fix typo
Yu Watanabe [Mon, 5 Jan 2026 23:48:00 +0000 (08:48 +0900)] 
man: fix typo

3 months agopstore: fix typo
Yu Watanabe [Mon, 5 Jan 2026 23:45:22 +0000 (08:45 +0900)] 
pstore: fix typo

3 months agoimport: update comment: implementor -> implementer
Yu Watanabe [Mon, 5 Jan 2026 23:43:02 +0000 (08:43 +0900)] 
import: update comment: implementor -> implementer

Both implementor and implementer are correct, but we use implementer at
other places.

3 months agosysusers: document u! version support
Tobias Stoeckmann [Mon, 5 Jan 2026 21:56:17 +0000 (22:56 +0100)] 
sysusers: document u! version support

Document at which version the exclamation mark suffix is supported.
Version 215 at the end of the list item is a bit misleading.

3 months agoNEWS: fix typo
Zbigniew Jędrzejewski-Szmek [Mon, 5 Jan 2026 09:05:09 +0000 (10:05 +0100)] 
NEWS: fix typo

3 months agoTEST-13-NSPAWN: remove pulled image on exit
Yu Watanabe [Mon, 5 Jan 2026 12:21:59 +0000 (21:21 +0900)] 
TEST-13-NSPAWN: remove pulled image on exit

Otherwise, if the VM is unexpectedly rebooted, then `importctl --user pull-tar`
may fail as the file may already exist.
```
[  123.351751] TEST-13-NSPAWN.sh[3946]: + run0 -u testuser importctl --user pull-tar file:///var/tmp/image-tar/kurps.tar.gz nurps --verify=checksum -m
[  123.541603] TEST-13-NSPAWN.sh[4311]: Enqueued transfer job 3. Press C-c to continue download in background.
[  123.552456] TEST-13-NSPAWN.sh[4311]: Pulling 'file:///var/tmp/image-tar/kurps.tar.gz', saving as 'nurps'.
[  123.552788] TEST-13-NSPAWN.sh[4311]: Operating on image directory '/home/testuser/.local/state/machines'.
[  123.819942] TEST-13-NSPAWN.sh[4311]: Got 1% of file:///var/tmp/image-tar/kurps.tar.gz.
[  124.156557] TEST-13-NSPAWN.sh[4311]: * shutting down connection #0
[  124.156896] TEST-13-NSPAWN.sh[4311]: * Could not open file /var/tmp/image-tar/kurps.tar.gz.sha256
[  124.157223] TEST-13-NSPAWN.sh[4311]: * closing connection #-1
[  124.159198] TEST-13-NSPAWN.sh[4311]: * Could not open file /var/tmp/image-tar/kurps.nspawn
[  124.159493] TEST-13-NSPAWN.sh[4311]: * closing connection #-1
[  124.159818] TEST-13-NSPAWN.sh[4311]: Acquired 68.5M.
[  124.160395] TEST-13-NSPAWN.sh[4311]: Download of file:///var/tmp/image-tar/kurps.tar.gz complete.
[  124.160664] TEST-13-NSPAWN.sh[4311]: Transfer failed: Could not read a file:// file
[  124.160923] TEST-13-NSPAWN.sh[4311]: Settings file could not be retrieved, proceeding without.
[  124.404733] TEST-13-NSPAWN.sh[4311]: * shutting down connection #1
[  124.405162] TEST-13-NSPAWN.sh[4311]: Acquired 79B.
[  124.406170] TEST-13-NSPAWN.sh[4311]: Download of file:///var/tmp/image-tar/SHA256SUMS complete.
[  124.406734] TEST-13-NSPAWN.sh[4311]: SHA256 checksum of file:///var/tmp/image-tar/kurps.tar.gz is valid.
[  124.455446] TEST-13-NSPAWN.sh[4311]: Failed to rename to final image name to /home/testuser/.local/state/machines/.tar-file:\x2f\x2f\x2fvar\x2ftmp\x2fimage-tar\x2fkurps\x2etar\x2egz: File exists
[  124.457251] TEST-13-NSPAWN.sh[4311]: Exiting.
```
Workaround for issue #38240.

3 months agomkosi: stop using noble-proposed for qemu
Nick Rosbrook [Mon, 5 Jan 2026 14:29:53 +0000 (09:29 -0500)] 
mkosi: stop using noble-proposed for qemu

The qemu update migrated to noble-updates a couple weeks ago, so it is
no longer necessary to enable noble-proposed (or add the associated apt
pinning config).

3 months agojournal-remote test: add -Z in mkdir for journal-{remote,upload}.conf.d
Cathy Hu [Mon, 5 Jan 2026 15:13:15 +0000 (16:13 +0100)] 
journal-remote test: add -Z in mkdir for journal-{remote,upload}.conf.d

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

3 months agoukify: omit .osrel section when --os-release= is empty
Nick Rosbrook [Fri, 19 Dec 2025 16:01:49 +0000 (11:01 -0500)] 
ukify: omit .osrel section when --os-release= is empty

The primary motivation for this is to allow users of ukify to build
UKI-like objects, without having them later be detected as a UKI by
tools like kernel-install and bootctl.

The common code used by these tools to determine if a PE binary is a UKI
checks that both .osrel and .linux sections are present. Hence, adding
a mechansim to skip .osrel provides a way to avoid being labeled a UKI.

3 months agoshared/edit-util: ignore ENOTDIR when trying editors
Pablo Fraile Alonso [Thu, 25 Dec 2025 12:32:43 +0000 (13:32 +0100)] 
shared/edit-util: ignore ENOTDIR when trying editors

3 months agocompress: do not call lzma_end_wrapper() when failed to load liblzma
Yu Watanabe [Mon, 5 Jan 2026 07:12:40 +0000 (16:12 +0900)] 
compress: do not call lzma_end_wrapper() when failed to load liblzma

Fixes a bug in 3fc72d54132151c131301fc7954e0b44cdd3c860 (v256).
Fixes #40277.

3 months agoidn: drop support for libidn
Mike Yuan [Sun, 4 Jan 2026 22:21:14 +0000 (23:21 +0100)] 
idn: drop support for libidn

The current tree doesn't even compile with libidn(1) after
2c7bdaf9f144ad339c72628579183fc849f2b794, which included
a non-existent call to check_dlopen_blocked() somehow.
Hence, it feels safe to just nuke legacy support from
our repo.

3 months agotest-time-util: ignore failure on MSK timezone
Yu Watanabe [Mon, 5 Jan 2026 07:01:34 +0000 (16:01 +0900)] 
test-time-util: ignore failure on MSK timezone

Ignore the following failures:
- with glibc
```
TZ=Europe/Volgograd, tzname[0]=MSK, tzname[1]=MSD
@1414277092997572 → Sun 2014-10-26 01:44:52 MSK → @1414273492000000 → Sun 2014-10-26 01:44:52 MSK
src/test/test-time-util.c:448: Assertion failed: Expected "ignore" to be true
```
- with musl
```
TZ=Europe/Kirov, tzname[0]=MSK, tzname[1]=MSK
@1414277092997572 → Sun 2014-10-26 01:44:52 MSK → @1414273492000000 → Sun 2014-10-26 01:44:52 MSK
src/test/test-time-util.c:448: Assertion failed: Expected "ignore" to be true
```

3 months agomeson: remove deprecated meson options
Yu Watanabe [Sun, 4 Jan 2026 20:38:06 +0000 (05:38 +0900)] 
meson: remove deprecated meson options

These options are deprecated since
87541e254f5b0f7e6c2060867bbfe095d206f573 : -Dcryptolib=
710653d3bcc46d6c45d8771e0a74c8d5f6328bc4 : -Dintegration-tests=

3 months agomkosi: update debian commit reference to f05328feafba2156f31e17e0e2c144cfa7c66e72
Yu Watanabe [Sun, 4 Jan 2026 22:28:39 +0000 (07:28 +0900)] 
mkosi: update debian commit reference to f05328feafba2156f31e17e0e2c144cfa7c66e72

f05328feaf Drop use of deprecated options
19ed139d85 Mark sd-userdbd as Multi-Arch: foreign

3 months agoudev: downgrade log level about failure in notification 40275/head
Yu Watanabe [Sun, 4 Jan 2026 22:20:50 +0000 (07:20 +0900)] 
udev: downgrade log level about failure in notification

These may fail on shutdown/reboot, as the notification socket is already
closed.

Closes #39943.

3 months agodaemon-util: introduce notify_remove_fd()
Yu Watanabe [Sun, 4 Jan 2026 22:18:56 +0000 (07:18 +0900)] 
daemon-util: introduce notify_remove_fd()

It is equivalent to notify_remove_fd_warn() but logs in debug level on
failure.

3 months agosysext: Get verity user certs from given --root=
Kai Lueke [Thu, 27 Nov 2025 08:49:15 +0000 (17:49 +0900)] 
sysext: Get verity user certs from given --root=

The verity user certs weren't looked up in the given --root= for
systemd-sysext which made it fail to set up extensions with a strict
image policy.
Look up verity user certs from inside the --root= when we operate on
images in it. The main use case where this matters is when the initrd
sets up the extensions for the final system and thus systemd-sysext
should do the same thing as it would do in the final system.

3 months agoTweak setting of boot timeout variables (#40125)
Yu Watanabe [Sun, 4 Jan 2026 21:50:49 +0000 (06:50 +0900)] 
Tweak setting of boot timeout variables (#40125)

3 months agocore: several follow-ups (#40140)
Yu Watanabe [Sun, 4 Jan 2026 21:31:48 +0000 (06:31 +0900)] 
core: several follow-ups (#40140)

Replaces #39925
Closes #39925

3 months agocore: move several checks from _start() to _test_startable() where appropriate
Mike Yuan [Wed, 17 Dec 2025 13:40:48 +0000 (14:40 +0100)] 
core: move several checks from _start() to _test_startable() where appropriate

If these basic sanity checks fail, there's no point in
bumping ratelimit.

3 months agoman/systemd.socket: Document JoinsNamespaceOf= support
Lucas Werkmeister [Sun, 4 Jan 2026 13:19:14 +0000 (14:19 +0100)] 
man/systemd.socket: Document JoinsNamespaceOf= support

This has been supported since systemd v242 (specifically commit
7619cb32f0 if I’m not mistaken; added to NEWS in commit 4107452e51), but
the man page still claimed otherwise.

3 months agonss-systemd: always fill sg_adm and sg_mem in shadow groups (#40218)
Yu Watanabe [Sun, 4 Jan 2026 18:12:26 +0000 (03:12 +0900)] 
nss-systemd: always fill sg_adm and sg_mem in shadow groups (#40218)

The `sg_adm` and `sg_mem` fields are not always set in shadow groups,
which can lead to issues with foreign tools like shadow's `sg` command.
Since other NSS implementations properly set these fields and it would
otherwise be impossible to access `administrators` and `members`
information from JSON files, it's bets to always fill these fields.

Even though `sg` is a nice example which should be already installed,
the issue itself can be reproduced with this simple program as well. It
relies on filled `sg_adm` and `sg_mem` fields just like `sg` does:

```
#include <err.h>
#include <gshadow.h>
#include <stdio.h>

int
main(int argc, char *argv[])
{
        struct sgrp *s;
        char **p;

        if (argc != 2)
                errx(1, "usage: poc group");

        s = getsgnam(argv[1]);
        printf("name: %s\n", s->sg_namp);
        printf("admins:\n");
        p = s->sg_adm;
        while (*p != NULL) {
                printf("- %s\n", *p);
                p++;
        }
        printf("members:\n");
        p = s->sg_mem;
        while (*p != NULL) {
                printf("- %s\n", *p);
                p++;
        }
}
```

Run it like this: `./poc root`

Proof of Concept (Arch Linux, which uses systemd with systemd-userdbd
and shadow's sg):

```
$ grep systemd /etc/nsswitch.conf
passwd: files systemd
group: files [SUCCESS=merge] systemd
shadow: files systemd
gshadow: files systemd
```

Issue with intrinsic groups:

Run as unprivileged user, who has no access to `/etc/gshadow` to trigger
nss-systemd (strace disables setuid of sg)
```
$ strace sg root
write(2, "sg: list.c:169: is_on_list: Asse"..., 61sg: list.c:169: is_on_list: Assertion `NULL != list' failed.
) = 61
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fa7e9c0c000
gettid()                                = 1882
getpid()                                = 1882
tgkill(1882, 1882, SIGABRT)             = 0
--- SIGABRT {si_signo=SIGABRT, si_code=SI_TKILL, si_pid=1882, si_uid=1000} ---
+++ killed by SIGABRT (core dumped) +++
Aborted                    (core dumped) strace sg root
```

Issue with groups through systemd-userdbd:

1. Create a custom group (as root)
```
cat > /etc/userdb/sg-poc.group << EOF
{
  "groupName": "sg-poc",
  "gid": 6123,
  "administrators": [
    "root"
  ],
  "members": [
    "bin"
  ]
}
EOF
ln -s sg-poc.group /etc/userdb/6123.group
```

2. Verify that group actually exists
```
$ userdbctl group sg-poc
  Group name: sg-poc
 Disposition: regular
         GID: 6123
      Admins: root
     Service: io.systemd.NameServiceSwitch
```

3. Run `sg` to switch into group `sg-poc` as regular user, this time
with setuid, i.e. no strace as before
```
$ sg sg-poc
sg: list.c:169: is_on_list: Assertion `NULL != list' failed.
Aborted                    (core dumped) sg sg-poc
```

3 months agoshared/install: ignore aliasing failure when doing presets
Zbigniew Jędrzejewski-Szmek [Sun, 4 Jan 2026 14:10:42 +0000 (15:10 +0100)] 
shared/install: ignore aliasing failure when doing presets

In recent Fedora, preset-all fails:
[  155s] Failed to preset unit: File '/buildroot/etc/systemd/user/dbus.service'
         already exists and is a symlink to /usr/lib/systemd/user/dbus-broker.service
[  155s] ‣ "systemctl --root=/buildroot --global preset-all" returned non-zero exit code 1.

Strictly speaking, this is an error in configuration. The presets specify that
both dbus-broker.service and dbus-daemon.service shall be enabled and they both
claim the 'dbus.service' alias. But this kind of error is very easy to make.
Failing the preset operation is too harsh, since in most cases the system will
work fine without an alias and changes in unrelated components can cause the
conflict.

Let's reuse the same logic that was added in
ad5fdd391248432e0c105003a8a13f821bde0b8e: when enabling the unit through
'preset' or 'preset-all', print the message, but suppress the error. When
enabling through 'enable', fail the operation.

3 months agoLogging cleanups (#40271)
Yu Watanabe [Sun, 4 Jan 2026 18:06:09 +0000 (03:06 +0900)] 
Logging cleanups (#40271)

3 months agonss-systemd: add unit test for sg_adm/sg_mem 40218/head
Tobias Stoeckmann [Sun, 4 Jan 2026 11:19:22 +0000 (12:19 +0100)] 
nss-systemd: add unit test for sg_adm/sg_mem

Add a test for getsgnam_r to verify that sg_adm and sg_mem always point
to a NULL-terminated string vector.

Extend the gr_mem check of struct group for non-NULL values as well.

3 months agonss-systemd: set sg_adm/sg_mem for all groups
Tobias Stoeckmann [Sat, 27 Dec 2025 14:27:05 +0000 (15:27 +0100)] 
nss-systemd: set sg_adm/sg_mem for all groups

Fill sg_adm and sg_mem in nss_pack_group_record_shadow to stay
compatible with other NSS getsgnam implementations which set these
members to NULL terminated string arrays.

Tools like shadow's sg would trigger a NULL pointer dereference with
groups only found through nss-systemd otherwise.

3 months agonss-systemd: set sg_adm/sg_mem in intrinsic groups
Tobias Stoeckmann [Sat, 27 Dec 2025 14:24:45 +0000 (15:24 +0100)] 
nss-systemd: set sg_adm/sg_mem in intrinsic groups

The sg_adm and sg_mem fields are supposed to point to a NULL terminated
string array. If these are NULL, some foreign tools like shadow's sg
trigger NULL pointer dereferences (or fortunately their asset() calls).

3 months agoinhibit: fix borked double logging on error 40271/head
Zbigniew Jędrzejewski-Szmek [Sun, 4 Jan 2026 11:25:32 +0000 (12:25 +0100)] 
inhibit: fix borked double logging on error

Previously, if execution failed, we'd log at error level both from the
child and the parent, and we were using a bogus variable for the argument
name:
$ build/systemd-inhibit list
Failed to execute : No such file or directory
list failed with exit status 1.

In general, we can and should assume that the program the user is calling
is well behaved, so it'll log the error on its own if appropriate. So we
shouldn't log on "normal errors", but only if the child is terminated by
a signal.

And since the program name is controlled by the user, use quotes everywhere
to avoid ambiguity.

Now:
$ build/systemd-inhibit false
(nothing)
$ build/systemd-inhibit bash -c 'kill -SEGV $$'
src/basic/process-util.c:895: 'bash' terminated by signal SEGV.

3 months agobasic/process-util: reduce scope of variables
Zbigniew Jędrzejewski-Szmek [Sun, 4 Jan 2026 11:21:52 +0000 (12:21 +0100)] 
basic/process-util: reduce scope of variables

3 months agobasic/process-util: use synthetic errno in two more places
Zbigniew Jędrzejewski-Szmek [Sun, 4 Jan 2026 11:18:38 +0000 (12:18 +0100)] 
basic/process-util: use synthetic errno in two more places

3 months agossh-generator: reword error message
Zbigniew Jędrzejewski-Szmek [Wed, 17 Dec 2025 21:51:26 +0000 (22:51 +0100)] 
ssh-generator: reword error message

We have two error messages with exactly the same message.
Let's change one so that it is possible to distinguish them
in logs.

3 months agobootctl: round the timeout up 40125/head
Zbigniew Jędrzejewski-Szmek [Fri, 21 Nov 2025 11:53:20 +0000 (12:53 +0100)] 
bootctl: round the timeout up

I think this is better: if I specify 0.5s, I'd be suprised if the
menu didn't show up at all.

3 months agobootctl: rework setting of menu timeout variables
Zbigniew Jędrzejewski-Szmek [Fri, 21 Nov 2025 11:32:18 +0000 (12:32 +0100)] 
bootctl: rework setting of menu timeout variables

menu-force and menu-hidden were added in 97f077df052c75224dcc73375bfaaa69af6a1c26,
menu-disable was added in 6efdd7fec5106205240332bd3b7fd2f93d4d9d4c, a year later.
So we can assume that if the feature flag is set, the other string values are
supported too. The comment that there's no way check that was added later in
5b45fad4fcfa2dd81f25b13fe8d7717f62fa5843, but it was incorrect even at that
time.

Fixes https://github.com/systemd/systemd/issues/39167. As described in the
issue, we documented various string values in the BLI, but bootctl didn't use
the string values. At the time menu-force and menu-hidden were added, using
numerical values for compatibility made sense. But that stopped being needed
when a string value that didn't have a strictly equivalent numerical value and
a feature flag were added.

When converting a large number to menu-force, message is downgraded to debug,
since the severity of the issue is very minor. Debug messages are added in
other places when the requested setting is modified too.

3 months agocalendarspec: day of month also needs to be reset when year is changed
Yu Watanabe [Sun, 4 Jan 2026 00:37:46 +0000 (09:37 +0900)] 
calendarspec: day of month also needs to be reset when year is changed

Fixes #40260.

3 months agoswitch-root: don't do rm_rf() of old superblock on switch root if pivot_root() worked
Lennart Poettering [Fri, 2 Jan 2026 15:30:58 +0000 (16:30 +0100)] 
switch-root: don't do rm_rf() of old superblock on switch root if pivot_root() worked

We do the rm_rf_children() call only because in some cases we cannot
pivot_root() and hence the orginal root superblock stays pinned, and we
thus have to empty it to minimize its memory use. But if pivot_root()
worked (and the umount() for the old root), then there's really no need
to do this work.

Dropping this codepath is useful in context of Christian's recent work
to make the original initrd tmpfs unmountable, which means pivot_root()
will work, and thus there's no need to empty the tmpfs anymore, and we
can speed up boot a bit.

Fixes: #40250
3 months agoanalyze: properly handle nvpcrs that have not been initialized yet
Lennart Poettering [Wed, 24 Dec 2025 07:37:22 +0000 (08:37 +0100)] 
analyze: properly handle nvpcrs that have not been initialized yet

Let's explicitly check if NvPCRs are fully set up (allocated, anchored)
before we try to show them.

Alternative to: #40184

3 months agocore/dynamic-user: two trivial modernizations (#40264)
Yu Watanabe [Sat, 3 Jan 2026 22:26:19 +0000 (07:26 +0900)] 
core/dynamic-user: two trivial modernizations (#40264)

3 months agoquirks: touchpad: Set Duet 3 bt touchpad internal
David Santamaría Rogado [Sat, 3 Jan 2026 20:52:38 +0000 (21:52 +0100)] 
quirks: touchpad: Set Duet 3 bt touchpad internal

The touchpad is in a keyboard and touchpad combo that can be attached and
detached in a convertible device.

3 months agocore/dynamic-user: use fd_verify_linked() 40264/head
Mike Yuan [Sat, 3 Jan 2026 19:25:53 +0000 (20:25 +0100)] 
core/dynamic-user: use fd_verify_linked()

3 months agorepart: Don't silence mkfs.erofs if on a tty
DaanDeMeyer [Sat, 3 Jan 2026 12:11:38 +0000 (13:11 +0100)] 
repart: Don't silence mkfs.erofs if on a tty

mkfs.erofs is only sometimes verbose when not on a TTY, so let's not
silence it if we're on a TTY.

3 months agomkfs-util: Add one more log message
DaanDeMeyer [Sat, 3 Jan 2026 12:00:43 +0000 (13:00 +0100)] 
mkfs-util: Add one more log message

Formatting a filesystem might take a long time, so let's also log a
message when we start formatting it.

3 months agocore/dynamic-user: flock() does not return EBUSY
Mike Yuan [Sat, 3 Jan 2026 19:26:27 +0000 (20:26 +0100)] 
core/dynamic-user: flock() does not return EBUSY

3 months agoelf-util: fix alignment
Mike Yuan [Sat, 3 Jan 2026 19:08:12 +0000 (20:08 +0100)] 
elf-util: fix alignment

3 months agocore: do not provide non-dynamic user through DBus/Varlink
Yu Watanabe [Sat, 3 Jan 2026 03:46:56 +0000 (12:46 +0900)] 
core: do not provide non-dynamic user through DBus/Varlink

With a service with DynamicUser= with static user or group, e.g.,
```
$ systemd-run -p DynamicUser=yes -p Group=disk sleep infinity
```
previously the lookup by name and ID through DBus/Varlink are inconsistent:
```
$ busctl call org.freedesktop.systemd1 /org/freedesktop/systemd1 org.freedesktop.systemd1.Manager LookupDynamicUserByUID "u" 6
Call failed: Dynamic user ID 6 does not exist.

$ busctl call org.freedesktop.systemd1 /org/freedesktop/systemd1 org.freedesktop.systemd1.Manager LookupDynamicUserByName "s" disk
u 6

$ userdbctl group 6
  Group name: disk
 Disposition: system
         GID: 6
   Passwords: 1
     Service: io.systemd.NameServiceSwitch

$ userdbctl group disk
  Group name: disk
 Disposition: dynamic
         GID: 6
 Description: Dynamic Group
     Service: io.systemd.DynamicUser
```

With this change, the results of these methods are consistent.

Fixes #40228.

3 months agoclang-tidy: Enable more warnings (#39910)
Yu Watanabe [Fri, 2 Jan 2026 21:00:30 +0000 (06:00 +0900)] 
clang-tidy: Enable more warnings (#39910)

3 months agotree-wide: Migrate to pidref_safe_fork() (#40170)
Daan De Meyer [Fri, 2 Jan 2026 20:12:31 +0000 (21:12 +0100)] 
tree-wide: Migrate to pidref_safe_fork() (#40170)

3 months agosystemctl-preset-all: do not return 0 if unit_file_preset_all() fails
Antonio Alvarez Feijoo [Fri, 2 Jan 2026 14:20:20 +0000 (15:20 +0100)] 
systemctl-preset-all: do not return 0 if unit_file_preset_all() fails

Follow-up for ae9ff778cd141f9d24dd4743489b7e1000f22347