Commit Graph
86293 Commits
Author SHA1 Message Date
Daan De Meyer 77b3ddf2aa mkosi: Install musl in tools trees on Fedora/Arch
For debugging purposes.
2026-02-16 09:37:14 +01:00
Lennart Poettering e1ecec0274 update TODO 2026-02-16 09:06:03 +01:00
Yu Watanabe 618952f07e CODING_STYLE: fix typo
Follow-up for 83b4a5bb3d.
2026-02-16 14:35:21 +09:00
Yu Watanabe 06dca3f629 man: fix typo
Follow-up for 91b3620b07.
2026-02-16 14:34:04 +09:00
Yu Watanabe c33b112cac sd-varlink: fix typo
Follow-up for c0696f1f5d.
2026-02-16 14:32:15 +09:00
Yu Watanabe 5ac9a481cd network: fix typo
Follow-up for f8a4c3d375.
2026-02-16 14:30:38 +09:00
Yu Watanabe 3be36e6d64 NEWS: fix typo
Follow-up for 4ed1e2ea17.
2026-02-16 14:28:55 +09:00
gvenugo3andYu Watanabe 2291cf0626 network: implement varlink LinkUp and LinkDown methods
The new varlink methods are basically equivalent to 'ip link set INTERFACE up/down',
but they support polkit authentication. Also, on LinkDown, it gracefully
stops dynamic engines like DHCP client/server before the interface is
bring down. Hence, e.g. an empty RA on stop should be sent.

Co-authored-by: Yu Watanabe <watanabe.yu+github@gmail.com>
2026-02-16 14:28:52 +09:00
Yu Watanabe a48145203c network: use voffsetof() at more places 2026-02-16 14:28:52 +09:00
Yu Watanabe 345208a49b udev: guess if usb devices are internal external (#40649)
Actually we are defining databases to determine when a usb device is
inherent part of the system or if it's a external device.

Let's use the removable attribute of the port where it is connected to
say that. That gives us the ability to not rely on a particular vendor
only does external devices or to not having the need to be quirking
input subsystem for that purpose that will become unreliable as more and
more internal devices are connected over usb instead over ps2 or i2c
buses. Eg.
https://gitlab.freedesktop.org/libinput/libinput/-/commit/02b495e79022e64514015e1a3dea32997035dd4f?merge_request_iid=1389

Actually this has been seen as reliable in a small set of device from
normal laptops, to detachable ones. The need to check maxchild is 0 is
for detachable devices, pogo pin usbs are fixed, while we attach the
keyboard|touchpad dock the input devices tend to be directly connected
to that port and if the dock has more usbs tend to be a hub that then
exposes removable as unknow. If we don't set maxchild 0 we will not only
guess that the keyboard and touchpad are internal but also incorrectly
other input devices like mice connected to the dock's usb ports.

I have use a very generic name like INTEGRATION because is not actually
used for any other thing and is used to determine not only over usb bus
but for acpi, pci, platform actually.

Also a remap to actual libinput variables is done for compatibility
purposes. if it's possible to have only the INTEGRATION variable instead
multiple ones will be done in the future but is actually unclear.

This can also be used for example to achieve an actual feature that we
lack in linux, when a device with accelerometers and cameras is rotated
the video output is not, this tag the own device cameras as internal
while external ones as external to be able to only do that for the
internal ones.

Note that this has nothing to do with the removable attribute found in
usb storage devices where it's values can be 0 or 1. There is no
conflict at all because the removable attribute we check is specifically
the one found in usb port ones.
2026-02-16 13:25:35 +09:00
Oleksandr AndrushchenkoandYu Watanabe f8a4c3d375 network: add ModemManager support
[Match]
Name=wwan*

[Network]
LLDP=no
LinkLocalAddressing=no
IPv6AcceptRA=no

[ModemManager]
SimpleConnectPropertie]s=apn=internet ip-type=ipv4 allow-roaming=no pin=1111 operator-id=25503
RouteMetric=200
UseGateway=yes

Co-authored-by: Yu Watanabe <watanabe.yu+github@gmail.com>
2026-02-16 13:22:21 +09:00
David Santamaría Rogado 4ed1e2ea17 backlight: reduce clamp to 1%
Actually GNOME sets a clamp of 1% and divides in 20 steps the brightness
control. Using 5% clamp makes things like in a device with max value 640
to always be in the first brightness step in GNOME and we can't leave in
the minimum.

GNOME set steps of 640/20 = 32 with the zero step 640 * 1% = 6. When we
restart the device with the lowest bright systemd sees 6 but sets
640 * 5% = 32, so we get the brightness in the first step.

Tests in IPS and OLED panels have been done and 1% still seems a
comprensive minimun usable value so use that to allow all environments
to be able to set lower brightness values that won't be raised by
systemd at boot.

If your user enviroment allow to set excesive lower unusable values you
should blame it or yourself if you directle changes it through sysfs but
not systemd.
2026-02-16 13:20:55 +09:00
David Santamaría Rogado a4381cae8b udev: rules: guess devices if internal or external
Set ID_INTEGRATION variable to hint if a device is internal (inherent
part of the system) or external otherwise.
2026-02-16 03:46:25 +01:00
David Santamaría Rogado babfd9cbaa hwdb: don't error on empty hwdb file 2026-02-16 03:39:08 +01: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