Commit Graph
89829 Commits
Author SHA1 Message Date
Luca Boccassi 082356cecd core: add LUOSession= unit setting (#42530)
Acquiring a LUO session from /dev/liveupdate requires privileges, and
also the device is a single-owner driver so only a single process can
open it at any given time.

Add a LUOSession= service settings that allows units running without
privileges to get a session assigned to them.

The kernel imposes a 64 chars limit on session names, which is too short
to avoid clashes, so derive a hash from joining the unit name with the
parameter name, that way two units using the same setting don't clash.
2026-06-19 19:35:16 +01:00
Luca Boccassi ad0f618b7b meson: switch version to 262~devel 2026-06-19 19:08:35 +01:00
Luca Boccassi de9dbc37ad Finalize meson.version for v261 2026-06-19 19:08:35 +01:00
Luca Boccassi 7dd5ddcb18 NEWS: finalize 2026-06-19 19:08:35 +01:00
Luca Boccassi 24893c78e8 NEWS: update contributors list 2026-06-19 19:08:35 +01:00
Luca Boccassi 7c1f7c54c9 Update hwdb autosuspend
ninja -C build update-hwdb-autosuspend
2026-06-19 19:08:35 +01:00
Luca Boccassi 0453506073 Update hwdb
ninja -C build update-hwdb
2026-06-19 19:08:35 +01:00
Lennart Poettering 13340c6af2 Revert "units: drop After=network-online.target from imds services"
IMDS access requires networking, hence we need to run after
network-online.target. Everything else would be racy and result in
likely timeouts, because we might try to contact the network too early.

This reverts commit 3f33f4d057.
2026-06-19 20:05:14 +02:00
Arif Budiman 55fa7b9d4c po: Translated using Weblate (Indonesian)
Currently translated at 100.0% (285 of 285 strings)

Co-authored-by: Arif Budiman <arifpedia@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/id/
Translation: systemd/main
2026-06-19 19:00:33 +01:00
Nick Rosbrook 3405c9da33 mkosi: copy packaged test-fdstore if not built locally
On Ubuntu autopkgtest, TEST-91-LIVEUPDATE fails because test-fdstore is
not found in the dummy container.
2026-06-19 18:35:15 +01:00
Luca Boccassi 58f7c2a559 crypto-util: support OpenSSL 4 (#42655) 2026-06-19 15:36:43 +01:00
Zbigniew Jędrzejewski-Szmek b9f7a76b14 Fix handling of UKI/SBAT and UKI/Firmware config entries. (#42478)
This fixes 2 issues with `ukify`:

`config_list_prepend` needs a list. The 2 more used entries are
specially treated (parsed into a list) and therefore happen to work, but
trying to set `UKI/Firmware` throws a type error, as it is passed as
just a string.

The `UKI/SBAT` config entry is a list but used the default `config_push`
value which sets it if unset (which also failed since its default of
`[]` is not `None`) - change this to `config_list_prepend`.

I did consider adding a `config_list_append`, but as far as I'm aware,
the order of sbat entries should not change the outcome anyway.
2026-06-19 15:16:30 +02:00
Luca Boccassi ccdd42351f crypto-util: support OpenSSL 4
OpenSSL 4 broke ABI, so we need to look for both SONAMEs.
Try libcrypto.so.3 first, and fallback to libcrypto.so.4,
so that the older and more stable version is used if both
are installed, giving distros time to fix regressions.
2026-06-19 13:58:52 +01:00
Luca Boccassi 98943422b5 test: sha1/sm3/md5 can get build-time disabled in openssl
Do not fail tests if any of these get disabled in the openssl
build

Follow-up for c52a003dc8
2026-06-19 13:32:24 +01:00
Lennart Poettering 436fc02bc8 update NEWS 2026-06-19 11:49:43 +02:00
jmestwa-coder 3a6059e9c0 catalog: bound item offsets against the mmap in the binary reader
The binary catalog reader trusted two values straight from a (possibly
hostile) database: open_mmap() summed header_size + n_items *
catalog_item_size in uint64 with no overflow check, and find_id() added
the matched item's offset to the map base with no upper bound. Reachable
through sd_journal_get_catalog() with $SYSTEMD_CATALOG set, this let
catalog_get()/catalog_list() strdup() a string starting outside the
mapping. Guard the size math with MUL_SAFE/INC_SAFE and reject item
offsets that fall outside the file.
2026-06-19 16:54:46 +09:00
Will Fancher 7aaa26571d cryptsetup: Invalidate ineffective try_discover_key before trying
A single incorrect password attempt from the user would be tried
twice, because the first failed try would think it was the
try_discover_key method that failed, and would invalidate that instead
of the actual failed password. This resulted in the user being
prompted one fewer time than they should be.

Fixes #38495
2026-06-19 15:23:21 +09:00
Luca Boccassi b0f3e068e2 journalctl: dlopen gcrypt in the --setup-keys path
journalctl needs gcrypt to set up the journal sealing
keys and other such operations, but gets no dlopen note
with the dependency. Add the dlopen macro with a recommends
level so it can be skipped, but gets pulled in by default
on user/desktop systems.

Follow-up for 590e226437
2026-06-19 15:22:02 +09:00
arvind froiland 603b52bcdb po: Added translation using Weblate (Norwegian Bokmål)
Co-authored-by: arvind froiland <arvind@froiland.no>
2026-06-18 12:57:18 +01:00
Yu Watanabe 4483a8ffc7 meson: add -mstackrealign on i386 with musl and libucontext
On i386 with musl and libucontext, many tests crash with SIGSEGV
when using fibers implemented on top of ucontext APIs.

For example:
```
 929/1498 libsystemd - systemd:test-event-future                                   FAIL             0.97s   killed by signal 11 SIGSEGV
/* test_sd_event_run_timer */
run-suspend-timer: Scheduling fiber
/home/pmos/build/src/systemd-261-rc3/tools/test-crash-trace.sh: line 18: 19994 Segmentation fault         (core dumped) "$@"
===== exit 139 — replaying under gdb =====
/* test_sd_event_run_timer */
run-suspend-timer: Scheduling fiber

Program received signal SIGSEGV, Segmentation fault.
0xf7d68be3 in sd_event_add_time_relative (e=0xf7ffd3f0, ret=0xf7b01fa0, clock=1, usec=10000, accuracy=0, callback=0x565564ad <inner_timer_handler>, userdata=0xf7b01fa4) at ../src/libsystemd/sd-event/sd-event.c:1455
1455	                void *userdata) {

Thread 1 (process 20485 "test-event-futu"):
 #0  0xf7d68be3 in sd_event_add_time_relative (e=0xf7ffd3f0, ret=0xf7b01fa0, clock=1, usec=10000, accuracy=0, callback=0x565564ad <inner_timer_handler>, userdata=0xf7b01fa4) at ../src/libsystemd/sd-event/sd-event.c:1455
        t = 17868423377094431728
        r = <optimized out>
 #1  0x565574c7 in sd_event_run_timer_fiber (userdata=0x0) at ../src/libsystemd/sd-event/test-event-future.c:329
        inner = 0xf7ffd3f0
        source = 0x0
        counter = 0
        r = <optimized out>
 #2  0xf7dab308 in fiber_entry_point () at ../src/libsystemd/sd-future/fiber.c:208
        _cleanup_log_unset_prefix_5 = 0x0
        __unique_prefix_c6 = 0x5655bb30
        f = 0xf7b06840
        __func__ = "fiber_entry_point"
        fake_stack_save = <optimized out>
 #3  0xf7b032ae in setcontext () from /lib/libucontext.so.1
 No symbol table info available.
 #4  0x00000000 in ?? ()
 No symbol table info available.
```

Building systemd with -mstackrealign makes all observed failures
disappear, suggesting a stack alignment issue in the interaction
between compiler-generated code and the ucontext implementation.

This resembles historical stack alignment issues in glibc's i386
makecontext() implementation, which required fixes to preserve the
expected stack alignment.

As a workaround, add -mstackrealign when building on i386 with musl
and libucontext.

Suggested-by: ChatGPT (OpenAI)
2026-06-18 12:46:44 +02:00
Luca Boccassi 82b8615463 core: add LUOSession= unit setting
Acquiring a LUO session from /dev/liveupdate requires privileges,
and also the device is a single-owner driver so only a single
process can open it at any given time.

Add a LUOSession= service settings that allows units running
without privileges to get a session assigned to them.

The kernel imposes a 64 chars limit on session names, which is
too short to avoid clashes, so derive a hash from joining the
unit name with the parameter name, that way two units using
the same setting don't clash.
2026-06-17 13:11:15 +01:00
Luca Boccassi 9404fa70df string-util: add STRING_DISALLOW_WHITESPACE for string_is_safe
Co-developed-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-17 13:11:15 +01:00
Luca Boccassi e887767d04 mkosi: fix suse build (#42637)
No longer exists since latest spec changes, as the binaries have moved
to another package so it doesn't get autogenerated anymore

Follow-up for db9d7265f5
2026-06-17 13:11:02 +01:00
Christian Brauner 31c01aabd8 docs: Update AI usage policy (#42636)
The previous policy was primarily written from a standpoint
that AI models are not very good and we didn't wanna waste any
time reviewing PRs generated by AI. Now that AI models have become
actually good and their output is just as good as regular contributions,
let's stop requiring the disclosure as its pointless to still have it,
it doesn't really matter anymore whether a patch was written with or
without
AI. It's up to the author to make sure they're not wasting our time by 
submitting unreviewed, untested code upstream, regardless of whether
that
code is written by an AI or not.

The new policy is inspired by https://github.com/lxc/incus/pull/3506,
with
various removals to be less adverse to the usage of AI.
2026-06-17 13:21:39 +02:00
Luca Boccassi 237c97160c mkosi: clean up generated rpm pre scripts in suse builds
2026-06-17T10:11:08.3789573Z Untracked files:
 2026-06-17T10:11:08.3790064Z   (use "git add <file>..." to include in what will be committed)
 2026-06-17T10:11:08.3790566Z    systemd-network.pre
 2026-06-17T10:11:08.3790908Z    systemd-resolve.pre

Follow-up for db9d7265f5
2026-06-17 11:29:32 +01:00
Daan De Meyer 27c5a2f2d7 docs: Update AI usage policy
The previous policy was primarily written from a standpoint
that AI models are not very good and we didn't wanna waste any
time reviewing PRs generated by AI. Now that AI models have become
actually good and their output is just as good as regular contributions,
let's stop requiring the disclosure as its pointless to still have it,
it doesn't really matter anymore whether a patch was written with or without
AI. It's up to the author to make sure they're not wasting our time by 
submitting unreviewed, untested code upstream, regardless of whether that
code is written by an AI or not.

The new policy is inspired by https://github.com/lxc/incus/pull/3506, with
various removals to be less adverse to the usage of AI.
2026-06-17 09:59:34 +00:00
Luca Boccassi 1bab6341cc mkosi: drop obsolete systemd-boot-debuginfo suse package
No longer exists since latest spec changes, as the binaries have
moved to another package so it doesn't get autogenerated anymore

Follow-up for db9d7265f5
2026-06-17 10:55:50 +01:00
doof 0a0aa429d3 Steam deck lcd screen is a tablet LCD rotated in the kernel
into portrait mode.

The IMU is not active in lizard mode. The command below disables
lizard mode and activates the IMU.

echo N | sudo tee /sys/module/hid_steam/parameters/lizard_mode

Closes #42586
2026-06-17 10:17:06 +01:00
jmestwa-coder 17260a97c8 fix ellipsis buffer overflow in xescape_full and utf8 escapers 2026-06-17 08:53:55 +02:00
Luca Boccassi 5fa2f85c10 sd-dlopen: fix build on 'hppa'
On hppa '.equ' is overridden, so even this workaround ('.set' is
overridden on alpha) causes a build failure:

cc -Isrc/basic/libbasic.a.p -Isrc/basic -I../src/basic -Isrc/fundamental -I../src/fundamental -Isrc/systemd -I../src/systemd -Isrc/version -I../src/version -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=gnu17 -O0 -g -Wno-missing-field-initializers -Wno-unused-parameter -Wno-nonnull-compare -Warray-bounds -Warray-bounds=2 -Wdate-time -Wendif-labels -Werror=bool-compare -Werror=discarded-qualifiers -Werror=flex-array-member-not-at-end -Werror=format=2 -Werror=format-signedness -Werror=implicit-function-declaration -Werror=implicit-int -Werror=incompatible-pointer-types -Werror=int-conversion -Werror=missing-declarations -Werror=missing-parameter-name -Werror=missing-prototypes -Werror=overflow -Werror=override-init -Werror=pointer-sign -Werror=return-type -Werror=sequence-point -Werror=shift-count-overflow -Werror=shift-overflow=2 -Werror=strict-flex-arrays -Werror=undef -Wfloat-equal -Wimplicit-fallthrough=5 -Winit-self -Wlogical-op -Wmissing-include-dirs -Wmissing-noreturn -Wnested-externs -Wold-style-definition -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-aliasing=2 -Wstrict-prototypes -Wsuggest-attribute=noreturn -Wunterminated-string-initialization -Wunused-function -Wwrite-strings -Wzero-as-null-pointer-constant -Wzero-length-bounds -fdiagnostics-show-option -fexcess-precision=standard -fno-common -fstack-protector -fstack-protector-strong -fstrict-flex-arrays=3 -fno-math-errno --param=ssp-buffer-size=4 -Wno-unused-result -Werror=shadow -fPIC -fno-strict-aliasing -fstrict-flex-arrays=1 -fvisibility=hidden -fno-omit-frame-pointer -include config.h -isystem../src/include/glibc -isystem../src/include/override -isystemsrc/include/override -isystem../src/include/uapi -fvisibility=default -MD -MQ src/basic/libbasic.a.p/compress.c.o -MF src/basic/libbasic.a.p/compress.c.o.d -o src/basic/libbasic.a.p/compress.c.o -c ../src/basic/compress.c
/tmp/ccxm7Waj.s: Assembler messages:
/tmp/ccxm7Waj.s:2085: Error: bad or irreducible absolute expression; zero assumed
/tmp/ccxm7Waj.s:2085: Error: junk at end of line, first unrecognized character is `,'
/tmp/ccxm7Waj.s:2268: Error: bad or irreducible absolute expression; zero assumed
/tmp/ccxm7Waj.s:2268: Error: junk at end of line, first unrecognized character is `,'
/tmp/ccxm7Waj.s:2544: Error: bad or irreducible absolute expression; zero assumed
/tmp/ccxm7Waj.s:2544: Error: junk at end of line, first unrecognized character is `,'
/tmp/ccxm7Waj.s:2800: Error: bad or irreducible absolute expression; zero assumed
/tmp/ccxm7Waj.s:2800: Error: junk at end of line, first unrecognized character is `,'
/tmp/ccxm7Waj.s:2956: Error: bad or irreducible absolute expression; zero assumed
/tmp/ccxm7Waj.s:2956: Error: junk at end of line, first unrecognized character is `,'

'.equiv' works on all architecures, but breaks on CentOS 9 due to binutils
2.35. Use an ifdef. Can be dropped and switch to '.equiv' once binutils 2.36
is the baseline.

Follow-up for 7590eb0c74

Co-developed-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-17 08:45:41 +02:00
Zbigniew Jędrzejewski-Szmek f886dd5ca5 mkosi: update debian/suse commit references (#42628) 2026-06-17 08:44:24 +02:00
Ulrich Ölmann 6cf4171625 man/systemd.mstack: fix typos 2026-06-17 08:34:02 +02:00
dongshengyuan 51d63dadd0 sysext,sysusers: fix wrong error variable in two error paths
sysext: utimensat() failure was logged with stale r (which is 0 after
the preceding successful write_backing_file call). Pass errno instead
so the actual failure reason is recorded and returned.

sysusers: rename() failure in make_backup() returned the raw positive
errno value. All callers check 'if (r < 0)', so the error was silently
ignored, allowing execution to continue after a failed backup. Return
-errno instead.

Signed-off-by: dongshengyuan <dongshengyuan@uniontech.com>
Co-developed-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-17 08:32:51 +02:00
Luca Boccassi b3c9dc95a8 mkosi: update debian commit reference to df071398a62e65b8c975e8a65f81162b46eca8ff
* df071398a6 Update changelog for 261~rc4-1 release
* 97cbe673fa Drop skip-not-installable autopkgtest restriction, deprecated
* 5f639bd7b5 Override bogus Lintian warnings
* 714ebbf53d Install new files from v264~rc4
* 25887faf4f Install new files for upstream build
2026-06-17 01:22:55 +01:00
Luca Boccassi db9d7265f5 mkosi: update opensuse commit reference to 462bd9f5eae8d113d0e477455278f64d0284afe8
* 462bd9f5ea Update systemd to version 260.2 / rev 469 via SR 1356344
* 28967f9151 Update systemd to version 260.1 / rev 468 via SR 1353801
* 086bdf7ca5 Update systemd to version 260.1 / rev 467 via SR 1348897
* 8e7d3d3067 Update systemd to version 259.5 / rev 466 via SR 1338788
* 069ac9826b Update systemd to version 259.3 / rev 465 via SR 1336527
* 7ed02aefd6 Update systemd to version 258.5 / rev 464 via SR 1335466
* 811b7f2076 Update systemd to version 258.4 / rev 463 via SR 1332808
* 45a28d7f95 Update systemd to version 258.3 / rev 462 via SR 1329291
* 37342ddc36 Update systemd to version 257.9 / rev 461 via SR 1324470
* 7eafa80da7 Update systemd to version 258.3 / rev 460 via SR 1323386
* 29c9ee6b49 Update systemd to version 257.9 / rev 459 via SR 1321158
* 39613f8d2e Update systemd to version 258.2 / rev 458 via SR 1320482
* c235f1dcf5 Update systemd to version 257.9 / rev 457 via SR 1305565
2026-06-17 01:22:55 +01:00
Luca Boccassi 785e4c00a7 mkosi: define ext_man macro in suse rpm build
The suse spec now uses:

 %{_mandir}/man3/*.3%{?ext_man}

which defaults to .gz and fails, as we disable compression.
Redefine it to avoid a build failure:

 Processing files: systemd-doc-260.2-00.noarch
 error: File not found: /var/tmp/BUILD/systemd-260.2-build/BUILDROOT/usr/share/man/man3/*.3.gz
2026-06-17 01:22:55 +01:00
Luca Boccassi 379bba482b mkosi: install sysuser-tools in suse build images
This provides the sysusers RPM macros that the new version
of the spec file uses
2026-06-17 01:05:26 +01:00
Zbigniew Jędrzejewski-Szmek e1c18779bc TODO: add item for btrfs subvolumes in tmpfiles 2026-06-17 00:16:29 +02:00
ButterflyOfFire fbc011305e po: Translated using Weblate (Kabyle)
Currently translated at 41.0% (117 of 285 strings)

Co-authored-by: ButterflyOfFire <butterflyoffire@users.noreply.translate.fedoraproject.org>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/kab/
Translation: systemd/main
2026-06-16 22:05:56 +01:00
Yu Watanabe 204c83e5bc TEST-64-UDEV-STORAGE: skip multipath test if multipathd.service does not exist
Rather than checking os-release, but let's check if we have necessary
service unit.
2026-06-16 19:34:27 +01:00
Luca Boccassi c55c651cc0 meson: bump version to v261~rc4 2026-06-16 17:57:06 +01:00
Luca Boccassi 8170156f29 NEWS: update time and place 2026-06-16 17:57:06 +01:00
Luca Boccassi febb547335 NEWS: update contributors list 2026-06-16 17:57:06 +01:00
Luca Boccassi 9decc099ce Update hwdb autosuspend
ninja -C build update-hwdb-autosuspend
2026-06-16 17:57:06 +01:00
Luca Boccassi b8fbcbf2b7 Update hwdb
ninja -C build update-hwdb
2026-06-16 17:57:06 +01:00
Luca Boccassi e0edfca4cb LUO: only deserialize on boot, add version and structure to JSON payload (#42607) 2026-06-16 17:55:56 +01:00
Lennart Poettering 76ef4902d3 homectl: actually honour --mute-console= (#42617) 2026-06-16 17:13:29 +02:00
dongshengyuan 98cae7a125 core: fix unit_merge() load state check evaluating after state overwrite
The condition on line 1206 checks other->load_state != UNIT_STUB to
decide whether to call the vtable done() callback, but the state was
already overwritten to UNIT_MERGED on line 1198, making the condition
always true.

Save the original load_state before overwriting it, so that units in
UNIT_STUB state (which never went through a load attempt) correctly
skip the done() call.

Signed-off-by: dongshengyuan <dongshengyuan@uniontech.com>
Co-developed-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-16 15:43:37 +01:00
Daan De Meyer a77838a950 nsresourced: reclaim ranges from dead namespaces during allocation
The only runtime trigger for registry cleanup is the BPF kprobe that fires
on user namespace destruction; when it is missed (ring buffer overflow,
kprobe missing, fdstore entry dropped), the dead namespace's registry entry
survives and keeps its UID/GID ranges blocked until the manager restarts and
its startup sweep runs. The allocation hot path checked whether a candidate
range was already taken but never whether the namespace holding it was still
alive, so a single dead namespace could permanently starve an allocation.
This is most visible when a parent delegates its entire container UID window
to a child that then dies: every subsequent allocation from the parent fails
with NoDynamicRange even though the ranges are reclaimable.

Add userns_registry_reap_if_dead(), which probes a registered namespace's
liveness via the kernel namespace identifier recorded at allocation time and,
if it is authoritatively dead, releases its registry entry — restoring any
ranges it received via delegation to their ancestors. Call it from the
allocation availability check for both transient registrations and delegated
ranges, walking a chain of dead ancestors in the delegation case. This
mirrors the existing inode-slot stale cleanup and makes allocation
self-healing without waiting for a restart.

The startup sweep grew the same load-probe-release logic, so route it through
the new helper too; its errno return distinguishes alive, no-recorded-id, and
unprobeable-environment cases so the sweep keeps its early-out when lookup by
id isn't possible at all.

Co-developed-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-16 14:00:03 +01:00
Luca Boccassi ced0bf2f70 core: add version and structure to LUO json payload
We might want to add more state to the LUO session json payload,
so add a version (to allow clean compat breaks if needed) and nest
the current fdstore contents under a 'units' object, so that more
top-level data can be added in the future without breaking
backward compatibility.

Follow-up for 257c35c1a3
2026-06-16 13:51:59 +01:00