Commit Graph
89814 Commits
Author SHA1 Message Date
Lennart Poettering 7683c3281c report: turn systemd-report itself into a varlink service
Add a Varlink API for requesting a report.
2026-06-19 05:23:18 +02:00
Lennart Poettering 9c3e443021 report: add simple metrics provider that just reads files 2026-06-19 05:23:18 +02:00
Lennart Poettering 2640a3b0e2 report: add a simple software-backed signing backend 2026-06-19 05:23:18 +02:00
Lennart Poettering 3c2f7c6002 report: add support for optionally signing reports
These signatures can be provided by arbitrary Varlink backends symlinked
into /run/systemd/report/sign.

Also add a proper Varlink IDL for the upload interface, since we are
extended it now.
2026-06-19 05:23:18 +02:00
Lennart Poettering 0d9026c736 report: separate report generation from upload
Let's split report generation from uploading, as prepatory step for
adding signing for reports.

No real code changes, just moving things around.
2026-06-19 05:00:06 +02:00
Lennart Poettering d086eb6d2e report: don't consider it an error if a backend replies io.systemd.Metrics.NoSuchMetric
If an error returns this it (currently) has no metric to report. Which
is entirely fine, treat it as such.
2026-06-19 05:00:06 +02:00
Lennart Poettering 9b3df70ae0 varlink: also support symlinks in varlink_execute_directory() 2026-06-19 05:00:06 +02: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 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
Luca Boccassi 4436d492b5 mkosi: fix escape in suse repackaging script
Otherwise it trips on files such as:

 Installed (but unpackaged) file(s) found:
 /usr/lib/udev/hwdb.d/70-debug-appliance.hwdb

Follow-up for 4d0f1451b5
2026-06-16 12:15:59 +01:00
dongshengyuan 30071f51e5 misc: fix minor error handling issues
fstab-generator: pass k instead of r to bus_error_message() so the
fallback error string reflects the actual bus call failure, not the
accumulated result that was reset to 0 earlier.

networkd-ndisc: return -ENOMEM when newdup() fails, since r is 0 at
that point and the OOM would otherwise be reported as success.

storagetm: add missing NULL check after strndup() for attr_model,
matching the pattern already used for attr_firmware and attr_serial.

Signed-off-by: dongshengyuan <dongshengyuan@uniontech.com>
Co-developed-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-16 11:44:08 +01:00
Luca Boccassi 229abeaf8d core: only attempt to deserialize state from LUO on boot
Avoid trying to query for our LUO session on reexec/softreboot/reload/etc.
Currently /dev/liveupdate is only accessible to root so it's not a big
issue, but this might change in the future, so make sure nobody can
play games with us.

Follow-up for 257c35c1a3
2026-06-16 11:35:11 +01:00
Luca Boccassi bedabe36cc obs: prepare ParticleOS images in workflow
Link ParticleOS images in the workflow subproject for the PR,
so that they can be enabled with a click when needed.
But keep disabled by default, as they take a lot of resources,
especially disk space.
2026-06-16 11:08:45 +01:00
dongshengyuan f50ac21ceb gpt-auto-generator: fix error propagation in add_root_mount()
When generator_write_initrd_root_device_deps() fails, the error was
swallowed by returning 0 (success) instead of r. The two subsequent
calls in the same block correctly return r on failure.

Signed-off-by: dongshengyuan <dongshengyuan@uniontech.com>
Co-developed-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-16 10:26:23 +02:00
dongshengyuan cfed283b9c mount: log control command before clearing it in mount_sigchld_event()
control_command and control_command_id were cleared before being passed
to unit_log_process_exit(), so the log always showed an invalid/unknown
command name.

Move both clears after the log call, matching the ordering in
socket_sigchld_event() and service_sigchld_event().

Signed-off-by: dongshengyuan <dongshengyuan@uniontech.com>
Co-developed-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-16 10:14:02 +02:00
guido fc06cd756e Add Elecom Huge Plus information for wired usb, wireless usb, and bluetooth 2026-06-16 10:13:42 +02:00
Daan De MeyerandLuca Boccassi 3978b076af loop-util: shortcut block device fd when it carries no partition table
663f0bf5cb stopped reusing the original block device fd whenever
partition scanning was requested (LO_FLAGS_PARTSCAN) but couldn't be
enabled on the device, so that nested partition tables on devices the
kernel won't scan (e.g. the pmOS/android case) get exposed via a real
loop device.

However that also forced a pointless loop device for any partition that
carries a file system directly, e.g. a btrfs subvolume mounted via
MountImages=. For multi-device btrfs this is fatal: the kernel rejects
seeing the same member via both the original partition and the loop
device, and the mount fails.

A loop device is only ever needed here to expose a nested partition
table. So only refuse the shortcut when the device actually carries one,
probed via gpt_probe(), instead of whenever partition scanning is
disabled. Devices carrying a file system directly (or nothing) take the
shortcut as before.

Add an integration test to cover the failure scenario of the original
issue.

Fixes: https://github.com/systemd/systemd/issues/42520
Replaces: https://github.com/systemd/systemd/pull/42576
Follow-up for 663f0bf5cb79ecaf6dd71441ecdc9dc401e7eae6

Co-Authored-By: Luca Boccassi <luca.boccassi@gmail.com>
Co-developed-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-16 00:16:05 +01:00
Luca Boccassi 53f5f840c7 report: place Upload() on io.systemd.Report.Uploader rather than io.systemd.Report interface (#42584)
We really want to use io.systemd.Report for the interface provided by
systemd-report itself, not by its backend. hence, rename the interface
that uploading plugins shall implement to io.systemd.Report.Uploader.

Note that we ideally should have a varlink interface definition for that
interface. if we had, we'd have noticed that earlier.
2026-06-15 22:05:18 +01:00
Luca Boccassi 8127d21ffc tools: add script to print blurb for SPI yearly report
Co-developed-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-15 20:45:36 +01:00
Lennart Poettering de4611efc2 report: rename varlink dir for upload plugins
let's name the dir "/run/systemd/report.upload/" (rather than
"/run/systemd/metrics-upload/"). After all, these are reports that we
upload, not indiviudual metrics. And it would be particular confusing
since the dir to pick up metrics is called /run/systemd/report/, rather
than /run/systemd/metrics/. Hence the thing that deals with reports is
nmamed metrics, and the thing that deals in metrics is named reports...
2026-06-15 20:54:37 +02:00
Lennart Poettering b144bdaf0c report: place Upload() on io.systemd.Report.Uploader rather than io.systemd.Report interface
We really want to use io.systemd.Report for the interface
provided by systemd-report itself, not by its backend. hence, rename the
interface that uploading plugins shall implement to
io.systemd.Report.Uploader.

Note that we ideally should have a varlink interface definition for that
interface. if we had, we'd have noticed that earlier.
2026-06-15 20:53:36 +02:00
Yu Watanabe 430f50503a ci/mkosi: set default values on use 2026-06-15 17:05:25 +01:00