Commit Graph

83654 Commits

Author SHA1 Message Date
Lennart Poettering
435bef5d05 kernel-install: when listing kernels sort them by version 2025-09-18 09:31:35 +02:00
Lennart Poettering
9e9fbaa620 format-table: add TABLE_VERSION cell type
This is exactly like TABLE_STRING, with one exception: it sorts via
strverscmp_improved().
2025-09-18 09:31:35 +02:00
Yu Watanabe
0c25f8fd0b sd-boot: allow configuration of log levels (#38701)
This allows for more liberal usage of logging functionality as messages
will no longer always show up on screen, regardless of urgency. The log
level to use can be configured through an SMBIOS type 11 string
(`io.systemd.boot.loglevel=`) or by using the `log-level` option in
loader.conf. Valid values are debug, info, notice, warning, err, crit,
alert, and emerg. By default, info will be used.
2025-09-18 12:06:48 +09:00
Yu Watanabe
6f1bc004e9 basic/efivars: read EFI variables using one read(), not two (#38864)
In https://github.com/systemd/systemd/issues/38842 it is reported that
we're again having trouble accessing EFI variables:
```
  [  292.212415] H (udev-worker)[253]: Reading EFI variable /sys/firmware/efi/efivars/LoaderDevicePartUUID-4a67b082-0a4c-41cf-b6c7-440b29bb8c4f.
  ...
  [  344.397961] H (udev-worker)[253]: Detected slow EFI variable read access on LoaderDevicePartUUID-4a67b082-0a4c-41cf-b6c7-440b29bb8c4f: 52.185510s
```

We don't know what causes the slowdown, but it seems reasonable to avoid
unnecessary read() calls. We would read the 4-byte attr first, and then
the actual value later. But our code always reads the value (and
discards the attr in all cases except one, when _writing_ the variable),
so let's optimize for the case where we read the value and read the
whole contents in one read().
2025-09-18 12:03:30 +09:00
Yu Watanabe
46869e32cd resolve: two cleanups for varlink method (#38467) 2025-09-18 11:57:04 +09:00
Luca Boccassi
773a7d9a4e mount-util: support 'atime' family of mount options for fsmount() 2025-09-18 11:54:39 +09:00
Tobias Heider
f405165065 stub: fix file path handling for loaded kernel
- Actually pass the new memory file path to parent_loaded_image->FilePath
- Restore old parent_loaded_image if Linux returns
- Pass the same kernel_file_path in load_via_boot_services path
- s/Re-use/Patch in comment explaining what we are doing

Fixes #38566
2025-09-18 11:40:43 +09:00
Yu Watanabe
f871c20bad systemd-repart: add encryption configs into repart.d/* (#38052)
As explained in https://github.com/systemd/systemd/issues/37892, it
would be nice to define per-partition PCRs/key file to use.

The global default config will be still defined as cmdline options, and
`TPM2PCRs=` and `KeyFile=` will be overriden by them.
2025-09-18 11:02:38 +09:00
Yu Watanabe
794f12c778 vmspawn: fix error handling
Follow-up for 9b5ba882bd.
2025-09-18 10:43:36 +09:00
Yu Watanabe
c6e6c85f83 test: several random cleanups and fixlets (#38877) 2025-09-18 09:13:17 +09:00
Yu Watanabe
600c757b5f resolve/varlink: use sd_json_dispatch_const_string() at more places 2025-09-18 09:07:36 +09:00
Yu Watanabe
6c135f7ace resolve/varlink: replace json_dispatch_address() with json_dispatch_byte_array_iovec() 2025-09-18 09:06:48 +09:00
Yu Watanabe
a55f64edc0 sysupdate: use conf_files_list_strv_full() where possible (#38198) 2025-09-18 08:56:23 +09:00
Felix Pehla
b3f3ce28f8 sd-boot: allow setting the log level through loader.conf
Allow configuring the log level used by sd-boot by setting
`log-level=<level>` in loader.conf. `info` is used by default.
2025-09-18 08:54:52 +09:00
Felix Pehla
0ce83b8a57 sd-boot: allow setting the log level through SMBIOS 11
Allow configuring the log level used by sd-boot by setting
`io.systemd.boot.loglevel=<level>` as SMBIOS type 11 string.
`info` is used if unset.
2025-09-18 08:54:52 +09:00
Felix Pehla
4f35d74998 sd-boot: allow setting the maximum log level 2025-09-18 08:54:52 +09:00
Felix Pehla
419e4dc450 sd-boot: efi-log: use log levels internally
Change log_internal() to receive a log level from which a text color is
derived, rather than the text color directly, and adjust various log_*
macros to use them internally.
2025-09-18 08:54:52 +09:00
Mike Yuan
9bec72c94f core/exec-credential: use CLEANUP_TMPFILE_AT 2025-09-18 08:53:43 +09:00
Govind Venugopal
d64720bbe7 Feature/homectl recovery key update (#38702)
Implements the ability to add recovery keys to existing user accounts
via homectl update --recovery-key=yes. Previously, recovery keys could
only be configured during initial user creation, requiring users to
recreate their entire home directory to add recovery keys later.

Fixes: #23602
2025-09-18 08:49:26 +09:00
Franck Bui
204c34040a units: don't force the loading of the loop and dm_mod modules in systemd-repart.service
This avoids loading the aforementioned modules when systemd-repart is skipped
during the boot process, which is the case most of the time.
2025-09-18 08:46:34 +09:00
Yu Watanabe
b594bdeb97 journalctl: add -W as short for --no-hostname (#38704)
--no-hostname is one of the switches I use very often. In particular,
when looking at CI logs, the hostname is almost never interesting.
2025-09-18 08:45:44 +09:00
Yu Watanabe
ddd2590a4e Align meson summary and gperf tables (#38578)
No functional change, just refactoring.
2025-09-18 08:44:08 +09:00
Yu Watanabe
fd1351e3c8 udev-rules: add OPTIONS="dump-json" to dump current status in JSON format
This produces the output similar to 'udevadm test --json=short'.
2025-09-18 08:43:18 +09:00
Yu Watanabe
7472ca8744 sd-event: drop cgroupv1 support in memory pressure event source 2025-09-18 08:43:02 +09:00
Yu Watanabe
75a9c87004 creds-util: fix comment
Follow-up for 444af9538f.
2025-09-18 08:26:28 +09:00
Daan De Meyer
00b6fe28b6 core/transaction: several cleanups (#38778) 2025-09-17 21:54:01 +02:00
Daan De Meyer
3c16aa53cc mkosi: several cleanups (#38924) 2025-09-17 21:52:16 +02:00
Yu Watanabe
052b15f4fe udev-config: use secure_getenv() at one more place
Follow-up for b16c6076cb.
2025-09-17 21:51:36 +02:00
Yu Watanabe
acd33c5df8 macro: flip ONCE macro to make log_once() and friend actually log once
Previously, ONCE is false for the first time, and true for later times,
hence log_once() and log_once_errno() suppress logging in the first call,
rather than later calls.

Fortunately, ONCE macro is only used in log_once() and log_once_errno(),
hence this only fixes spurious logging.
2025-09-17 21:50:19 +02:00
Lennart Poettering
444af9538f tmpfile-util: introduce new CLEANUP_TMPFILE_AT() API
This should allow us to get rid of a bunch of "fail:" labels, because we
can clean up tmpfiles relative to some atfd this way.

This only ports over a small number of potential users, but there's more
work to be done.
2025-09-17 19:51:13 +01:00
Lennart Poettering
23860b4975 varlink: add IDL comments to basic Varlink service interface 2025-09-17 19:48:53 +01:00
Lennart Poettering
acd4943528 copy: calculate bytes per second while copying, and pass to progress info
Also, show it in import-fs/repart.
2025-09-17 19:48:08 +01:00
Luca Boccassi
e566236fc1 vmspawn: two small tweaks (#38957) 2025-09-17 19:46:34 +01:00
Danilo Spinella
4301ad00ef boot: Strip boot counter from entry id
When boot counter is found in the boot entry filename, strip it from the
id to match bootctl id.

Fixes #38813.
2025-09-17 19:43:37 +01:00
Daan De Meyer
ff33c8f87d Extend test-dlopen-so to also cover cases when built without support
Let's make things more consistent and have all dlopen_xxx() functions
return EOPNOTSUPP on failure and verify this behavior in test-dlopen-so.
2025-09-17 19:40:17 +01:00
Luca Boccassi
9736f634c8 meson: fix link-udev-shared option
This doesn't work anymore, setting it to false still makes
udev link to libsystemd-shared, as an argument was mistakenly
dropped.

Follow-up for 6350d2dbd9
2025-09-17 19:37:54 +01:00
Lennart Poettering
85a725a942 pcrextend: add documentation for varlink api 2025-09-17 15:42:57 +02:00
Lennart Poettering
6413ccc625 sd-boot: rename "path" field to "directory"
"path" sounds like a fully qualified complete string referencing some
terminal object. But here it's not like that, the field just stores the
directory the object we actually care about is placed in. Hence let's
change this field to be named "directory", to be less confusing for
readers.
2025-09-17 15:40:05 +02:00
Yu Watanabe
97eeecaa3c mkosi: support the case /sbin/init is an absolute symbolic link
In that case, the link points to the host file, thus we cannot update
the file.
2025-09-17 22:21:11 +09:00
Yu Watanabe
f8d5efc703 mkosi: drop man package from global config
Some distributions does not have man package, but named man-db or so,
and most distribution specific mkosi.conf files already have them.
Let's drop man from the global config.
2025-09-17 22:21:11 +09:00
Yu Watanabe
b83f9acfef test: rearrange test-cgroup and test-cgroup-util 2025-09-17 22:20:42 +09:00
Yu Watanabe
194e05642f test: reenable test for cg_get_keyed_attribute()
The test case was mistakenly disabled by
a412a1b92a.

Co-authored-by: Natalie Vock <natalie.vock@gmx.de>
2025-09-17 22:20:42 +09:00
Yu Watanabe
6a616e62ad test: skip several test cases when running in chroot
When we are running in chroot, safe_fork() with FORK_MOUNTNS_SLAVE fails
with the following eror:
```
Failed to set mount propagation to MS_SLAVE for all mounts: Invalid argument
```
Let's skip the test cases when we are running in chroot.
2025-09-17 22:20:42 +09:00
Yu Watanabe
2ff79a81a8 test-mount-util: several cleanups
- use safe_fork() with common flags,
- introduce macro for checking privilege.
2025-09-17 22:20:42 +09:00
Yu Watanabe
aa5aac9e40 test-sysusers: show diffs in stderr
Otherwise, the diffs are eaten by 'meson test' command unless --verbose
option is specified.
2025-09-17 22:20:42 +09:00
Yu Watanabe
87a87b02b9 test-udev: pass test_env to make the test use systemd-detect-virt in build directory
Otherwise, the test fails if the running host does not have
systemd-detect-virt.
2025-09-17 22:20:42 +09:00
Yu Watanabe
abd0eb20e4 test-seccomp-util: several cleanups
- use safe_fork() with FORK_WAIT
- introduce CHECK_SECCOMP() macro about common checks,
- ignore ENOSYS from sched_setscheduler().
2025-09-17 22:20:42 +09:00
Yu Watanabe
6e219a09c2 test-parse-util: use newlocale() and freelocale() to set temporarl locale
This also drops unnecessary call of strtod(), as it is a test for
safe_atod().
2025-09-17 22:20:42 +09:00
Yu Watanabe
5809c451e8 test-efi-string: migrate to use ASSERT_OK() and friends 2025-09-17 22:20:42 +09:00
Yu Watanabe
248f651eb5 core/transaction: coding style update 2025-09-17 22:19:14 +09:00