Commit Graph
86281 Commits
Author SHA1 Message Date
Yu Watanabe b0ca2ef264 timesync: return earlier when an empty string is specified 2026-02-16 09:51:36 +09:00
Yu Watanabe 1bb9306f1e timesync: rename have_fallbacks -> fallback_set 2026-02-16 09:50:46 +09:00
Yu Watanabe 6d0e8271b4 boot: fix buffer alignment when doing block I/O (#40465)
UEFI Block I/O Protocol has `Media->IoAlign` field dictating the minimum
alignment for I/O buffer. It's quite surprising this has been lingering
here unnoticed for years, seems like most UEFI implementations have
small or no alignment requirements. U-Boot is not the case here, and
requires at least 512 byte alignment, hence attempt to read GPT
partition table fail and in effect systemd-boot can not find XBOOTLDR
partition.

These patches allow to boot from XBOOTLDR partition on U-Boot - tested
with latest systemd revision and U-Boot master
(`8de6e8f8a076d2c9b6d38d8563db135c167077ec`) on x64 and ARM32, of which
both are failing without the patch.

Also fixes Bitlocker probing logic, which is the only other place where
raw block I/O is used, however this is untested.
2026-02-16 09:10:01 +09:00
andre4ik3 4afa6cf07a locale-util: allow overriding locale directory via environment 2026-02-16 08:09:33 +09:00
Chris Down a267656b07 oomd: Prevent corruption of cgroup paths in Killed signal
While looking at oomd behaviour in production I noticed that I always
get garbage cgroup paths for the Killed event. Looking more closely, I
noticed that while the signature is (string cgroup, string reason), we
currently erroneously pass the `OomdCGroupContext*` pointer itself as
the first argument to sd_bus_emit_signal(), rather than the ctx->path
string it contains.

The in-memory layout on affected machines in my case is:

    struct OomdCGroupContext {
        unsigned n_ref;
        /* padding */
        char *path;
        /* ... */
    }

...which explains the control characters, since they're garbage from
parsing n_ref, the path pointer, and later fields. At runtime, sd-bus
treats ctx as `const char *` and reads struct bytes as string data,
resulting in garbage being sent.

Pass ctx->path correctly so listeners receive the valid cgroup path.
2026-02-15 18:25:28 +01:00
Artur Kowalski ccbd324a3a boot: respect minimal I/O alignment when doing block i/o
Fixes XBOOTLDR partition detection and bitlocker support when using
U-Boot as UEFI.
2026-02-15 15:54:45 +01:00
Artur Kowalski fd7c6d1ac1 boot: introduce xmalloc_aligned_pages
To be used for block I/O which may require specific buffer alignment.
2026-02-15 15:45:46 +01:00
Daan De Meyer 4e77671be7 mkosi: Remove some packages from the image
Let's slim down the image size a bit. None of the removed packages
should be required.
2026-02-15 12:51:00 +00:00
Chris Down 0a66431031 string-util: Prevent infinite loop pegging CPU on malformed ESC input
string_has_ansi_sequence() currently does this to look for ESC input:

    t = memchr(s, 0x1B, ...)

So each iteration re-searches from the original start pointer. But if we
find an ESC byte that does *not* start a valid ANSI sequence (like "\x1B
", or an ESC at the end of the string), then ansi_sequence_length()
returns 0, and if that ESC is still in the search window, we will just
spin consuming 100% CPU forever.

Fix this by always advancing past rejected ESC bytes.
2026-02-14 21:49:24 +01:00
Daan De Meyer 8734b0ff32 mkosi: update mkosi ref to 4b18ea8395e9cc2b1d247be93944f5539affe964 (#40681)
* 4b18ea8395 sandbox: Make sure eventfd is CLOEXEC
* 23ea86d0cf Revert "Bump minimum python version to 3.10"
* 81fd30ec77 Revert "sandbox: Use os.eventfd()"
* 717020c97b Revert "Use python3.12 as interpreter in CentOS Stream 9
zipapp"
* e1d0e45e3b Rework sandbox globbing and exist checks
2026-02-14 18:31:26 +01:00
Daan De Meyer fe989a1f5a mkosi: update mkosi ref to 4b18ea8395e9cc2b1d247be93944f5539affe964
* 4b18ea8395 sandbox: Make sure eventfd is CLOEXEC
* 23ea86d0cf Revert "Bump minimum python version to 3.10"
* 81fd30ec77 Revert "sandbox: Use os.eventfd()"
* 717020c97b Revert "Use python3.12 as interpreter in CentOS Stream 9 zipapp"
* e1d0e45e3b Rework sandbox globbing and exist checks
2026-02-14 16:04:57 +01:00
Daan De Meyer 5ae7db99bf tools: Fix changelog generation (again)
Using --first-parent --no-merges seems to exclude not just the merge
commits but all the commits from the merge as well. Let's use only
--no-merges to get just the commits without merges.
2026-02-14 16:04:55 +01:00
Yu Watanabe 009a170d2f mkosi: Update to latest and two speed improvements (#40678) 2026-02-14 23:08:00 +09:00
Baurzhan Muftakhidinov 2d4359fa89 po: Translated using Weblate (Kazakh)
Currently translated at 100.0% (264 of 264 strings)

Co-authored-by: Baurzhan Muftakhidinov <baurthefirst@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/kk/
Translation: systemd/main
2026-02-14 12:04:50 +00:00
Zbigniew Jędrzejewski-Szmek ce9d69c8a3 Two micro fixes for sd-json (#40676) 2026-02-14 11:54:17 +01:00
Daan De Meyer 7a70c32368 mkosi: Mark minimal images as Incremental=relaxed
Building these over and over again is extremely wasteful. Let's just
build them once and not touch them again unless -ff is specified or
their cache is out-of-date, which is exactly what Incremental=relaxed
does.

This means mkosi.extra/ and such changes won't be picked up for these
anymore unless -ff is used, but that slight annoyance is totally
outweighed by the time saved building the images.
2026-02-14 10:36:14 +01:00
Daan De Meyer 894477e6c1 mkosi: Use mkosi.initrd.conf
A more straightforward way to extend the default initrd rather than
using a subimage. This mainly allows us to take advantage of mkosi
automatically figuring out whether the initrd needs to be built or not,
speeding up builds when building directory images as the initrd can be
skipped in that case.
2026-02-14 10:36:14 +01:00
Daan De Meyer e739a10625 mkosi: update mkosi ref to d6ddc66acb05d3d761d3f600c6b029319db9ae95
* d6ddc66acb Use python3.12 as interpreter in CentOS Stream 9 zipapp
* 89d876c86f tests: fix running pytest on undetected distro
* 61a47eeb1c centos: Fix EPEL repositories for RHEL 10
* e5aa19e2bc oci: allow user defined labels and annotations
* 1680fc5789 man: be more precise that the tools tree distribution is decided by the host distribution
* 7025b8e67d Support resizing output image
2026-02-14 10:36:09 +01:00
Luca Boccassi 10a04f6fd2 test: do not fail when parsing PID that isn't thread-group leader (#40677)
```
TEST-02-UNITTESTS.sh[4382]: [  707.393188] test-cgroup-util[426]: Failed to open pidfd for pid 414: Invalid argument
TEST-02-UNITTESTS.sh[4382]: [  707.393193] test-cgroup-util[426]: src/test/test-cgroup-util.c:249: Assertion failed: Expected "r = proc_dir_read_pidref(d, &pid)" to succeed, but got error: -22/EINVAL
```

The kernel can return EINVAL on pidfd_open() when the selected PID is
not a thread group leader. Don't fail the test, as we are iterating on
everything, so this can seldomly happen.
2026-02-13 21:37:56 +00:00
Yu Watanabe a1c8e5e338 Allow non-system users/groups in networkd and udevd again (#40612) 2026-02-14 05:41:01 +09:00
Yu Watanabe da86da21e9 Fixes for option parsing (#40641)
Preparatory work split out of #40624.
2026-02-14 04:58:50 +09:00
Luca Boccassi 5b822977c2 sd-json: also skip assert_cc in VS Code parser
For some reason the VS Code parser thinks sd_json_variant is still 48 bytes,
so skip the assert when running in that parser too

Follow-up for 337712e777
2026-02-13 19:34:45 +00:00
Luca Boccassi 987f0fb062 sd-json: update comment regarding struct size
The assert at the bottom was updated when the size changed, but
the comment wasn't:

assert_cc(sizeof(sd_json_variant) == 40U);

Follow-up for 337712e777
2026-02-13 19:33:21 +00:00
Michael Vogt b5f8725989 varlinkctl: add pluggable protocol support to sd-varlink
When sd_varlink_connect_url() gets an unknown URL we now
check if there is a `$LIBEXECDIR/varlink-bridges/$scheme`
binary and execute it (with the url as the first arguments).

This makes varlink more flexible as it provides a way to
dynamically add "bridges" in LIBEXECDIR/varlink-bridges/. This is
conceptually similar to the libvarlink `varlink --bridge` command
and allows to e.g. call varlink over http{,s} via e.g. the new
varlink-http-bridge.

With a running varlink-http-bridge [0] one can do:
```console
$ varlinkctl call http://localhost:8080/ws/sockets/io.systemd.Hostname \
    io.systemd.Hostname.Describe {}
{
        "Hostname" : "top",
...
```

Closes: https://github.com/systemd/systemd/issues/40640

[0] https://github.com/mvo5/varlink-http-bridge/pull/1
2026-02-13 19:07:20 +01:00
Daan De Meyer e8055af5f0 dissect: Various cleanups and fixes
- Only call have_effective_cap() if needed
- Fix comments and logging

Follow up for #40212
2026-02-13 17:18:33 +01:00
Zbigniew Jędrzejewski-Szmek 62c1b91a26 kmod-setup: fix loading virtio modules, and load other vsock transport modules (#40557)
Fixes #40161.
Fixes #40503.
2026-02-13 16:56:59 +01:00
Yu Watanabe 7577bb4c08 udevadm: do not explicitly set white color
Otherwise, output on black-on-white terminals is not visible.

Follow-up for 13005c8f2c.
Fixes #40629.
2026-02-13 16:37:16 +01:00
Mike Yuan dd55894d0b Assorted minor follow-ups (#40673) 2026-02-13 16:30:57 +01:00
Mike Yuan b1cd249a69 core/service: correct desc for first-level credential refreshing process
It doesn't join the unit namespace. It would fork again to do so
if needed.
2026-02-13 14:51:44 +01:00
Mike Yuan d800432156 core/service: fix typo
Addresses https://github.com/systemd/systemd/pull/40093#discussion_r2803104490
2026-02-13 14:51:44 +01:00
Mike Yuan 17771794c3 login/meson.build: pkgsysconfdir cannot be 'no'
Whether to install example configs to sysconfdir should be
(solely) controlled via install_sysconfdir_samples, as done
everywhere else.
2026-02-13 14:51:44 +01:00
Mike Yuan a4add5c22c basic/meson.build: realign table header 2026-02-13 14:51:44 +01:00
Daan De Meyer 54ff4f4c82 test-capability-util: Migrate to new test framework and macros 2026-02-13 14:21:32 +01:00
Carlos Peón Costa e6fd7a3f50 resolve: refuse traffic from the local host only for queries 2026-02-13 11:40:27 +01:00
Daan De Meyer aca8ed4af1 portable: /run/systemd/portables => /run/portables 2026-02-13 11:40:11 +01:00
Daan De Meyer a81a88560b ssh-proxy: Fix runtime directory 2026-02-13 11:40:11 +01:00
Daan De Meyer 6ff7a8c691 Follow-ups for the metrics/report tool (#40642)
/cc @YapingLi04
2026-02-13 11:37:34 +01:00
Zbigniew Jędrzejewski-Szmek c46cc2630d man: make it clear that homectl -A/T/N do not take an argument
Just like in the --help strings, we need to avoid confusion between
short options which take an argument and those that don't.
2026-02-13 11:07:27 +01:00
Zbigniew Jędrzejewski-Szmek 952f3a5dbf homectl: drop --and-resize and --and-change-password
The two options are were not documented or ever used in the codebase.
Additionally, the parser expected an argumentless option, while the option
table declared a required argument. So I think this was added for debugging
and never excercised properly. Since there was no public documentation for
those, it's as if they never existed, so it should be fine to drop them.
2026-02-13 11:07:26 +01:00
Zbigniew Jędrzejewski-Szmek 097f130731 resolvectl: split out helper to parse stdin
No functional change, just splitting up of a lengthy function.
2026-02-13 11:07:25 +01:00
Zbigniew Jędrzejewski-Szmek b4df0a9ee6 nspawn: split out helper to parse --private-users
This is just to make parse_argv() slightly more managable.
2026-02-13 11:07:22 +01:00
Daan De Meyer 71de0a22ff core/service: support credentials refreshing on reload (#40093)
Closes https://github.com/systemd/systemd/issues/21099
Closes https://github.com/systemd/systemd/issues/35227
2026-02-13 10:21:44 +01:00
Yaping Li fffba61b78 metrics: fixing casing 2026-02-13 16:55:25 +09:00
Yu Watanabe 559dabbbde Two portabled fixes (#40664) 2026-02-13 16:53:29 +09:00
Luca Boccassi 421821d1e3 repart: set r/o GPT flag on verity sig partition too
The default image policy for the verity sig partition expects
the r/o flag to be set, but repart so far did not add it by
default if unset, like it does for the verity partition
2026-02-13 16:50:45 +09:00
Yu Watanabe 356cc4a1c3 kmod-setup: also load other vsock transport modules
Fixes #40161.
2026-02-13 16:14:54 +09:00
Yu Watanabe 6d36e5fae6 kmod-setup: fix loading virtio related drivers
It seems the device with modalias e.g. virtio:d00000013v, only appears
after the relevant module is loaded. So, we cannot use the string to
determine if we should load the module.

Fixes #40503.
2026-02-13 16:14:54 +09:00
Baurzhan Muftakhidinov 2cef4057f5 po: Added translation using Weblate (Kazakh)
Co-authored-by: Baurzhan Muftakhidinov <baurthefirst@gmail.com>
2026-02-13 15:49:34 +09:00
Daan De Meyer 48f0f1fd81 TEST-72-SYSUPDATE: Use some very long partition names
To catch issues like https://github.com/systemd/systemd/issues/40658.
The commit that fixes that issue can make the name even longer to ensure
we don't regress again in this regard.
2026-02-13 15:46:52 +09:00
Daan De Meyer 7b9600a6b2 sysupdate: Compute temporary paths before vacuuming
We don't want to vacuum anything if we're just going to fail just
afterwards because a GPT partition label exceeds the maximum size
so let's compute the temporary paths for all transfers before we do
any vacuuming or acquiring.
2026-02-13 15:46:52 +09:00