Commit Graph
85713 Commits
Author SHA1 Message Date
Lennart Poettering ded2531764 chase: optimize the special case where no root dir specified
Now that we can recognize the root dir in chaseat() sanely, let's use it
top optimize the very common special case where we have no root dir to
consider, and directly call open_tree().
2026-01-17 12:37:39 +01:00
Lennart Poettering 874971b1c0 chase: wire up XAT_FDROOT 2026-01-17 12:37:39 +01:00
Lennart Poettering 5667cbcacf fd-util: wire up XAT_FDROOT in various really basic fd-util.h calls 2026-01-17 12:37:39 +01:00
Lennart Poettering ef582ab201 fs-util: wire up XAT_FDROOT in xopenat_full() and access_fd() 2026-01-17 12:37:33 +01:00
Lennart Poettering ee79c9d309 fd-util: introduce XAT_FDROOT fd shortcut for the root dir
This takes inspiration from AT_FDCWD, but always references the root dir
rather than the cwd. This allows various convenience uses, as we can now
reference the root dir without actually allocating an fd for chaseat(),
fd_get_path() and various others.

The value of XAT_FDROOT is chosen so that it is not a valid fd (essential,
because we do not intend to hook this up everywhere, just where we need
it, just like AT_FCWD only works in some syscalls), and we want uses at
the wrong places to fail cleanly. It also uses a valud outside of the
range where we usually return negative errnos, i.e. < -ERRNO_MAX.
2026-01-17 12:35:33 +01:00
Lennart Poettering 947ecb0812 socket: turn of loud logging when setting up sockopts in container fails due to privs
Various socktops will fail if we run in a container, due to lack of
privs (for example SO_RECVFORCE as used by the journald sockets). That's
typically not a big issue. Hence downgrade the log level.

Follow-up for: f7df0eab8d
2026-01-17 08:47:14 +09:00
Lennart Poettering 834a7dfc12 hostnamectl: tweak three chassis emojis 2026-01-17 08:46:26 +09:00
Yu Watanabe 7d23749ddd mkfs-utils: also set $E2FSPROGS_FAKE_TIME if $SOURCE_DATE_EPOCH is set
Follow-up for 7bf0d0c46e.

To support e2fsprogs older than v1.47.1 (released 2024-05-21).

Suggested-by: ZauberNerd <zaubernerd@zaubernerd.de>
2026-01-17 08:45:50 +09:00
Yu Watanabe 3da9b65b30 hwdb: make three more hwdb files parsed by parse_hwdb.py
This also makes 70-lights.hwdb installed. The file was introduced by
106f64cbd6, but never installed.

Moreover, this makes the parser also check bluetooth modalias patterns.
2026-01-17 02:53:14 +09:00
Michael Vogt 62168b1e9f boot: change some log_error -> log_warning where appropriate
This is a small followup for
https://github.com/systemd/systemd/pull/40344#discussion_r2695031041
(thanks Daan and Lennart!).

There are quite a few places in the code that currently log a
`log_error()` when a `log_warning()` is more appropriate because
the error is ignored. This commit now shows those as warnings.
2026-01-17 02:52:48 +09:00
Yu Watanabe 4ac445c152 udev/net: support more ethtool features
Closes #39318.
2026-01-17 02:52:20 +09:00
Yu Watanabe b5100a4569 conf-files: several cleanups and fixlets (#40290)
Fixes #40313.
Closes #40285.
2026-01-17 02:51:17 +09:00
Yu Watanabe d5a7f58d1a Also drop SysV rc.local script support (#40295)
Continuation of #39770.
2026-01-17 02:50:08 +09:00
Lennart Poettering 919d0cc1d3 update TODO 2026-01-16 18:18:00 +01:00
Lennart Poettering 293854862e update TODO 2026-01-16 18:11:02 +01:00
Luca Boccassi 3e2a5dc2e1 dissect: support mount options when going through mountfsd, requiring privileges via polkit (#39394)
RootImageOptions=/ExtensionImages=/MountImages= all support custom
mount options, but mountfsd does not support it. Add varlink
parameters to allow callers to specify mount options so that
those directives can work as expected. Require additional privs via
polkit.
2026-01-16 14:55:02 +00:00
Yu Watanabe 2aa496312e conf-files: introduce CONF_FILES_WARN flag and set it at various places
Closes #40285.
2026-01-16 23:05:33 +09:00
Yu Watanabe f25d9e7c0e udevadm: log path prefixed with the specified root directory 2026-01-16 23:05:33 +09:00
Yu Watanabe 782569afd0 udevadm: gracefully handle when a maked file is specified to udevadm verify/cat
Previously, since 7cb4508c5a, if a masked
file is specified, the commands failed.
Let's warn that the file is masked and ignore the file.
2026-01-16 23:05:33 +09:00
gvenugo3andYu Watanabe 01efa01dd2 test: add test case for masked files in cat_files()
Add a test case to verify that cat_files() correctly handles symlinks
to /dev/null (masked configuration files) and returns success (0)
instead of failing.

This test complements the fix for issue #40313.

Co-authored-by: Yu Watanabe <watanabe.yu+github@gmail.com>
2026-01-16 23:05:33 +09:00
Yu Watanabeandgvenugo3 f212522923 pretty-print: do not fail when cat_files() tries to show a masked file
Before 661b5bfd21, cat_files() does not
check if a file is regular. If the file is a symlink to /dev/null, then
cat_files() simply shows an empty contents for the file.
With the offending commit, as the CHASE_MUST_BE_REGULAR flag is set,
hence when we found a masked file, the function fails.

Fixes #40313.
Fixes regression caused by 661b5bfd21.

Co-authored-by: gvenugo3 <gvenugo3@asu.edu>
2026-01-16 23:05:28 +09:00
Yu Watanabe 5d0dc9915c conf-files: make conf_file_new() take ConfFilesFlags rather than ChaseFlags
No functional change, preparation for later commit.
2026-01-16 23:01:04 +09:00
Yu Watanabe 0c109deda1 conf-files: use empty_to_root()
No functional change. For consistency with conf_file_chase_and_verify().
2026-01-16 23:01:04 +09:00
Yu Watanabe 4a8e0ea4ec conf-files: split out several helper functions from files_add()
No functional change, preparation for later commit.
2026-01-16 23:01:01 +09:00
Yu Watanabe 3de84f2381 NEWS: mention about the removal of sysv init script support 2026-01-16 22:57:39 +09:00
Yu Watanabe d207be293c Drop support for SysV rc-local script support
As already announced for several years.
2026-01-16 22:56:28 +09:00
Yu Watanabe 6e1d97fa2c mkosi: update debian commit reference to 93a222266c23ff73720f4de009a027d3556baee4
* 93a222266c Do not install rc-local generator in upstream build
2026-01-16 22:56:28 +09:00
Yu Watanabe 0a2cdd5891 Drop remaining references about sysv script support
Follow-up for 986fee6217.
2026-01-16 22:56:08 +09:00
Franck Bui 502d6f4bc9 core/dbus-manager: propagate meaningful dbus errors from EnqueueMarkedJobs
Previously, when `systemctl reload-or-restart --marked` failed the following
error was shown:

  Failed to start jobs: Failed to enqueue some jobs, see logs for details: Invalid argument

but no details were actually logged.

This change records failure reasons in the journal to help users identify root causes:

  # journalctl -b -e
  [...]
  systemd[1]: Queuing reload/restart jobs for marked units…
  systemd[1]: Operation refused, unit klogd.service may be requested by dependency only (it is configured to refuse manual start/stop).
2026-01-16 14:36:40 +01:00
Florian Klink f9a3f729ac hwdb: Add GPD Pocket 4 chassis quirk
See https://github.com/systemd/systemd/issues/7390#issuecomment-573607402
2026-01-16 14:34:23 +01:00
Daan De Meyer 2e51ed7fcb sd-varlink: Add SD_VARLINK_ANY
This allows representing fields that can be either an integer or
a string, like the "value" field we'll be adding in
https://github.com/systemd/systemd/pull/39202.

Upstream spec change: https://github.com/varlink/varlink.github.io/pull/43
2026-01-16 14:32:43 +01:00
Zbigniew Jędrzejewski-Szmek 3a5b37e162 Split up the giant switch statement in homectl's parse_argv (#40059)
This is in preparation for later changes. The 1500+ line switch statement was very
hard to work with and had quite a bit of duplicated code. This is a rework that
splits outs parts into functions. I split this up into a bunch of commits so that it
can be reasonably reviewed. When viewed as one giant commit, diff just shows
a giant block of removed code and a giant block of added code.

In some cases I wasn't sure why one or the other of the identity arrays is used…
I preserved existing behaviour in all cases.
2026-01-16 14:31:08 +01:00
Luca Boccassi 1bbeb78ea2 manager: add EnqueueMarkedJobs varlink method
Same as the D-Bus method. Returns array of job IDs.
2026-01-16 12:45:48 +00:00
Daan De Meyer 3fa3a4fd15 vpick: Fix pick_filter_image_any
Currently, pick_filter_image_any matches any image
with any suffix, which is way more than it should
be doing. It should only be matching images with
the .raw suffix.

Let's address this shortcoming by allowing to pass
multiple filters to path_pick(), and define
pick_filter_image_any as the combination of the
raw and directory image filters.

Fixes #40083
2026-01-16 13:07:47 +01:00
Michael Vogt 3f958812fd 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.
2026-01-16 10:26:48 +01:00
Mike Yuan 5119063196 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.
2026-01-15 13:56:34 +01:00
Michal Sekletar bcbf80c43d 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
2026-01-15 12:53:50 +01:00
Zbigniew Jędrzejewski-Szmek 311fddcd8d man/systemd.service: Expand docs on RestartSteps (#40309) 2026-01-15 11:41:17 +01:00
Mike Yuan 1d69e36c44 boot/initrd: fix typo
Follow-up for 80ab99d4d2
2026-01-15 11:36:13 +01:00
Dirk Su 1ef107cb22 hwdb: add HP EliteBoard Mic mute key mapping 2026-01-15 11:34:14 +01:00
Lennart Poettering 80ab99d4d2 efi: use 'struct iovec' more, pass initrds down with it 2026-01-15 11:32:33 +01:00
Zbigniew Jędrzejewski-Szmek f7047b8c1c mailmap: deduplicate some frequent contributors 2026-01-14 17:07:18 +01:00
DaanDeMeyer 90e80b9e8b docs: Document practice of using comments for argument names 2026-01-14 16:52:58 +01:00
Yu Watanabe 18de7dd90f integration tests: do not adjust log level of udevd in the test script
Similar to 5c60d3011f, but for udevd.
2026-01-14 16:32:38 +01:00
Yu Watanabe 04f05d9bd7 network: drop fallback logic for kernel older than v5.6
Now our baseline is kernel v5.10.
2026-01-14 16:31:12 +01:00
Zbigniew Jędrzejewski-Szmek 6e78240e64 udev: silence notification failures (#40275)
Closes #39943.
2026-01-14 16:26:00 +01:00
Michael Vogt b6eabd21ea 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".
2026-01-14 17:15:20 +09:00
Christian Hesse d1bd940deb man: drop duplicate "the" 2026-01-14 10:14:31 +09:00
Zbigniew Jędrzejewski-Szmek f2c3ef9678 homectl: add argument comments 2026-01-13 17:59:54 +01:00
Zbigniew Jędrzejewski-Szmek edd2a2a006 homectl: let drop_from_identity take multiple args
The only functional change should be that we deduplicate arg_identity_filter.
2026-01-13 17:59:54 +01:00