]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
9 days agotest: extend tests for new machine tag rules 42618/head
Lennart Poettering [Tue, 16 Jun 2026 13:58:05 +0000 (15:58 +0200)] 
test: extend tests for new machine tag rules

9 days agomachine-tags: optionally support key/value pairs as machine tags
Lennart Poettering [Tue, 16 Jun 2026 13:53:56 +0000 (15:53 +0200)] 
machine-tags: optionally support key/value pairs as machine tags

Other systems (kubernetes…) allow tagging machines with key/value pairs.
Let's extend our allowed syntax slightly to allow that too. Thankfully,
we enforced a pretty strict ruleset on machine tags, hence we can
introduce this without breaking compatibility.

This basically allows tags to contain "=". If so, then the left-hand
side of it must be unique among machine tags.

When matching against a machine tag, we apply the same rules as before.
This means, that if people want to check if a tag with value applies
they can do:

    ConditionMachineTag=foo=bar

If they just want to check if "foo=" is set to anything, they can use
the usual glob matching:

    ConditionMachineTag=foo=*

9 days agostring-util: make split_pair() return parameters optional
Lennart Poettering [Tue, 16 Jun 2026 13:57:32 +0000 (15:57 +0200)] 
string-util: make split_pair() return parameters optional

9 days agoboot/stub: honor PE SectionAlignment when loading inner kernel
Josh Hoffer [Thu, 4 Jun 2026 00:19:33 +0000 (17:19 -0700)] 
boot/stub: honor PE SectionAlignment when loading inner kernel

The stub copies the embedded kernel PE into an xmalloc_pages()
allocation with AllocateAnyPages, which only guarantees EFI_PAGE_SIZE
(4 KiB) alignment.

The arm64 kernel declares SectionAlignment = SZ_64K. When _text is not
64K-aligned the kernel's EFI stub reallocates and copies the image,
which can fail with EFI_OUT_OF_RESOURCES on memory-constrained firmware
(e.g. U-Boot, bounded by CONFIG_SYS_MALLOC_LEN rather than full DRAM).
The failure is non-deterministic since AllocateAnyPages returns whatever
page the allocator finds first.

Plumb SectionAlignment through pe_kernel_info() and allocate via
xmalloc_aligned_pages(). For alignment <= EFI_PAGE_SIZE (e.g. x86_64) it
reduces to a plain AllocatePages(), so the change is free there.

SectionAlignment comes from the PE header, which the spec requires to be
a power of 2. Sanitize it in pe_kernel_info() right where it is parsed:
a non-conforming value falls back to plain page alignment (matching the
behavior of older systemd-stub versions that ignored the field) rather
than propagate something that would break xmalloc_aligned_pages()'s
over-alignment maths, with a log_warning() so the fallback stays
diagnosable.

Co-developed-by: Claude <claude@anthropic.com>
Closes: #42443
Reported-By: Agathe Porte <agathe.porte@oss.qualcomm.com>
Tested-By: Agathe Porte <agathe.porte@oss.qualcomm.com>
9 days agosysext: Allow to (re)start units from extension-release metadata file
Kai Lüke [Thu, 28 May 2026 13:07:16 +0000 (22:07 +0900)] 
sysext: Allow to (re)start units from extension-release metadata file

Up to now we recommended to use TARGET.upholds/ symlinks to start units
when an extension is loaded. However, this has some drawbacks. First,
for services that should not be tried to be started all the time we have
to resort to hiding them through a target that gets uphold and then
uses regular .wants/ for the actual service. Second, we actually leak
services on extension unload even if the unit has disappeared with the
extension. Third, to affect a service through a drop-in or a config
change from a confext/sysext and that service is already running, we
need a way to restart/reload it instead of just starting it.

Similar to EXTENSION_RELOAD_MANAGER=1, add a EXTENSION_RESTART_UNITS=
and a EXTENSION_RELOAD_OR_RESTART_UNITS= setting to the
extension-release metadata file, carrying a whitespace-separated list
of units to restart/reload on merge/refresh/unmerge after the daemon
reload. Also detect when the unit has vanished which is normally the
case when the unit was part of the unmerged extension, and stop it
explicitly to prevent it leaking. When the extension itself ships the
binary it should use EXTENSION_RESTART_UNITS= to make sure the new
binary is picked up. Since starting through this setting does not work
when the extension is mounted from the initrd, extensions should still
ship at least a .wants/ symlink to start at boot but can also continue
to ship a .upholds/ symlink for backwards compatibility without any
drawback and still benefit from the unit stopping triggered by the new
setting. While there are cases where one could want to set
EXTENSION_RESTART_UNITS= without requiring a daemon reload (e.g., an
env var file change instead of a unit drop-in), we now do an implicit
daemon reload when we have to restart units so that we know we work on
the right state and we spare users remembering to set this setting in
addition to prevent running into this issue.

9 days agoAccept NSS aliases for canonicalized user records (#42452)
Lennart Poettering [Fri, 19 Jun 2026 20:14:03 +0000 (22:14 +0200)] 
Accept NSS aliases for canonicalized user records (#42452)

This PR fixes userdb lookups for NSS users that are resolved through an
alias but returned with a canonical user name.

Some NSS providers, such as SSSD, can successfully resolve a user by an
alias-like name, for example a Kerberos/AD UPN (for example
testuser@example.test) while returning a passwd record with the
canonical login name.

The original lookup name was not preserved. Later, the userdb worker
checked whether the returned record matched the requested name with
user_record_matches_user_name(). Since the requested name was
testuser@example.test, but the record only contained testuser, the
lookup was rejected as:
`io.systemd.UserDatabase.ConflictingRecordFound`

This also caused pam_systemd to fail opening sessions for such users
with:
`pam_systemd(...:session): Failed to get user record`

In my case, this broke graphical logins for Samba users logging in with
a UPN on systems where SSSD canonicalizes the NSS result.

My solution preserves the requested name as a UserRecord alias when an
NSS lookup by name succeeds but the returned pw_name differs from the
requested name.
This allows user_record_matches_user_name() to accept the canonicalized
NSS result instead of treating it as a conflicting record.
The patch does not invent new aliases. It only records the name that NSS
itself already accepted and resolved successfully.

I'm not an expert on working with systemd, so I'm asking for a review of
my PR.

9 days agorepart: Slightly simplify supplement partition code (#42508)
Lennart Poettering [Fri, 19 Jun 2026 20:13:12 +0000 (22:13 +0200)] 
repart: Slightly simplify supplement partition code (#42508)

Juts two small things that hopefully make it easier to read the code
around supplement/suppressing partitions.

cc @AdrianVovk

9 days agorepart: fix SizeMinBytes/SizeMaxBytes rounding direction
Liu Zhangjian [Tue, 9 Jun 2026 13:15:52 +0000 (21:15 +0800)] 
repart: fix SizeMinBytes/SizeMaxBytes rounding direction

The ltype parameter for SizeMinBytes and SizeMaxBytes in the config
parsing table was reversed. SizeMinBytes should round UP (ltype > 0)
to ensure the partition is at least the specified size, while
SizeMaxBytes should round DOWN (ltype < 0) to ensure the partition
doesn't exceed the specified size.

This matches the documentation in repart.d.xml which correctly states:
- SizeMinBytes: 'rounded upwards'
- SizeMaxBytes: 'rounded downwards'

The same fix is applied to PaddingMinBytes and PaddingMaxBytes which
share the same config_parse_size4096 parser.

Fixes: #42526
Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Liu Zhangjian <liuzhangjian@uniontech.com>
9 days agosysupdate: refuse reboot/pending logic when --component= is used (#42578)
Lennart Poettering [Fri, 19 Jun 2026 20:11:28 +0000 (22:11 +0200)] 
sysupdate: refuse reboot/pending logic when --component= is used (#42578)

Fixes #42330

The `pending` and `reboot` verbs, and the `--reboot` switch, decide
whether to reboot by comparing the newest installed version against the
booted OS version (`IMAGE_VERSION=` from os-release). When a component
is selected via
`--component=`, this ends up comparing the component's version against
the unrelated host OS version; by design these live in separate version
spaces, so the comparison is meaningless and reboot decisions become
arbitrary: depending on the relative version strings, sysupdate either
always reboots or never does.

### Example from the issue:

% /usr/lib/systemd/systemd-sysupdate --component=containerd reboot
Newest installed version '2.3.0' is older than booted version
'20260527200656'.

This refuses the combination with a clear error instead of silently
performing a bogus comparison:

- `verb_pending_or_reboot()` rejects `--component=` for the
`pending`/`reboot` verbs (mirroring the existing `--root=`/`--image=`
rejection).
- `verb_update_impl()` rejects `--reboot` combined with `--component=`,
before any update work is done.

Correctly tracking a per-component "booted" version (which could be
"none", making a reboot always apply) is a larger feature and left for
the future, as the reporter suggested.

The daemon (`sysupdated`) and `updatectl` don't perform this
host-version comparison, so the change is confined to the
`systemd-sysupdate` CLI.

Documentation and a negative regression test (TEST-72) are included.

### AI-use Disclosure:

I took assistance from Claude Opus 4.8 to scope out the issue, help with
writing proper comments/documentation, and help with writing the PR
description.

9 days agosysupdate: address review feedback on component/reboot guard 42578/head
Armaan Sandhu [Sat, 13 Jun 2026 09:25:12 +0000 (14:55 +0530)] 
sysupdate: address review feedback on component/reboot guard

Move the --reboot/--component= rejection into parse_argv() alongside the
other cross-option checks, and tighten TEST-72 to assert the specific
guard message rather than merely a non-zero exit.

9 days agosysupdate: refuse reboot/pending logic when a component is selected
Armaan Sandhu [Sat, 13 Jun 2026 07:25:51 +0000 (12:55 +0530)] 
sysupdate: refuse reboot/pending logic when a component is selected

The `pending` and `reboot` verbs, as well as the `--reboot` switch, compare
the newest installed version against the booted OS version (IMAGE_VERSION= from
os-release). When a component is selected via --component=, this compares the
component's version against the unrelated host OS version, which by design live
in separate version spaces. The result is arbitrary reboot decisions: depending
on the relative version strings sysupdate would either always or never reboot.

Refuse the combination with a clear error instead of silently performing a
bogus comparison. Correctly tracking a per-component booted version is left as a
future feature.

Fixes: https://github.com/systemd/systemd/issues/42330
9 days agopam: use default auth pam_deny.so
Ronan Pigott [Mon, 15 Jun 2026 23:58:42 +0000 (16:58 -0700)] 
pam: use default auth pam_deny.so

run0 doesn't actually use the auth pam stack, since polkit does the
requisite authorization. However, if the service type is left undefined
pam falls back to the definitions of the "other" service, which, at
least in Arch Linux but possibly more, includes pam_warn.so to notify
the user about this apparent error.

This creates a bit of logspam, as systemd does actually call pam_setcred
in its generic pam code, which depends on the auth pam stack, creating a
warning message in the journal on every invocation of run0.

pam_deny.so is a no-op, which avoids falling back to the other pam
service.

9 days agoudev: fix build failure due to concurrent merge
Luca Boccassi [Fri, 19 Jun 2026 18:43:13 +0000 (19:43 +0100)] 
udev: fix build failure due to concurrent merge

Follow-up for 60686a33c3030e8eb60cd1d10ac44bc8987f3627

9 days agohibernate: fix swap selection and prefer swap that can hold image
dongshengyuan [Wed, 17 Jun 2026 05:06:21 +0000 (13:06 +0800)] 
hibernate: fix swap selection and prefer swap that can hold image

When multiple swap devices exist, prefer one with enough free space
to hold the hibernation image over one that cannot, regardless of
priority. If no swap can fit, fall back to priority-first selection.

This avoids deterministically failing hibernation when the
highest-priority swap is too small but a lower-priority one fits.

Signed-off-by: dongshengyuan <dongshengyuan@uniontech.com>
Co-developed-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
9 days agovmspawn: minor fixes (#42634)
Luca Boccassi [Fri, 19 Jun 2026 18:39:45 +0000 (19:39 +0100)] 
vmspawn: minor fixes (#42634)

9 days agorepart: add live subscription support to ListCandidateDevices() varlink call (#42350)
Lennart Poettering [Fri, 19 Jun 2026 18:39:29 +0000 (20:39 +0200)] 
repart: add live subscription support to ListCandidateDevices() varlink call (#42350)

let's ensure one can watch suitables devices come and go via
ListCandidateDevices().

9 days agoboot: before starting the random seed logic, let's check if the backing volume R...
Lennart Poettering [Fri, 19 Jun 2026 18:39:03 +0000 (20:39 +0200)] 
boot: before starting the random seed logic, let's check if the backing volume R/O state (#42379)

Related: #42307

9 days agohostnamed: allow setting machine tags via udev rules (#42390)
Lennart Poettering [Fri, 19 Jun 2026 18:38:42 +0000 (20:38 +0200)] 
hostnamed: allow setting machine tags via udev rules (#42390)

This gives hostnamed a lot of love, and makes it possibly to "auto-tag"
a machine via a udev rule.

It builds on the machine tag concept added in v261.

9 days agonetwork: hook up "machine tag" concept, also with .network/.link/.netdev files
Lennart Poettering [Mon, 1 Jun 2026 08:23:50 +0000 (10:23 +0200)] 
network: hook up "machine tag" concept, also with .network/.link/.netdev files

Follow-up for: 461ec6facc4291cbdb3264d473bcab3e1d88e13a

9 days agoreport-basic: also report load average + swap size in metrics report
Lennart Poettering [Mon, 15 Jun 2026 08:19:54 +0000 (10:19 +0200)] 
report-basic: also report load average + swap size in metrics report

9 days agoreport: add support for signing reports via varlink backends + make report a varlink...
Lennart Poettering [Fri, 19 Jun 2026 18:37:25 +0000 (20:37 +0200)] 
report: add support for signing reports via varlink backends + make report a varlink service  (#42595)

This adds the following:

1. systemd-report gains a new --sign= option, taking a boolean. If true,
this makes systemd-report generate + systemd-report upload generate a
signed report, instead of a regular one. The signatures are collected
from Varlink-based backends.
2. One such backend is added which does a simple Ed21159 based signing
scheme.
3. this adds a new metrics source which just reports text files
symlinked into a special dir as metrics. This is used to report the
Ed21159 public key as metric, by default, if it exists.
4. finally, systemd-report itself is turned into a varlink service. this
is useful for example for extracting a report from a system coming in
via the varlink/http bridge.

I thought a long time about the format of signing of reports. Initially
i intended to do this like homed's user record signing, i.e. require
normalization of the record, then normalize the record, and write it out
in dense form, since the result. Finally insert the resulting hash into
the user record itself. People have pointed me to the inherent messiness
of signing JSON this way though, as it requires any participant that
wishes to sign/authenticate records this way to implement the exact same
normalization/formatting rules, and in particular in the area of
floating point numbers (of which metrics presumably will have many) this
is quite problematic.

This signing hence goes a different way. instead of expecting
signer+verifier to independently come to the same normalized text form
of the json data, let's instead output a JSON-SEQ sequence, where the
first object is the report, and any subsequent objects are one signature
each. the signatures are supposed to cover the precise binary
representation of the first element in the JSON-SEQ stream. (i.e. from
the RS to the NL).

or in other words: a verifier would receive the JSON-SEQ stream, split
it up before each RS. Then it would leave object 1 unparsed for the
moment, and parse objects 2…n. It would then authenticate object 1's
precise binary representation with objects 2…n. Once that checks out, it
would parse object 1, and use it as report.

9 days agoudev: run workers in sibling cgroup and use cgroup.kill
Luca Boccassi [Fri, 29 May 2026 10:23:23 +0000 (11:23 +0100)] 
udev: run workers in sibling cgroup and use cgroup.kill

Since a1f4fd387603673a79a84ca4e5ce25b439b85fe6 udev processes
run in an 'udev' subcgroup, to avoid killing control processes
when clearing workers. But the main process is still in the same
cgroup, so the atomic cgroup.kill cannot be used.

If the main subcgroup exists, try to create a sibling 'workers'
cgroup, and use it for workers processes, and use cgroup.kill if
available.

This is especially useful as rules can spawn arbitrary programs/scripts
and TasksMax= is set to unlimited.

9 days agocore: add KExecsCount property
Luca Boccassi [Mon, 15 Jun 2026 20:35:47 +0000 (21:35 +0100)] 
core: add KExecsCount property

Use LUO to count kexec reboots, and expose through a new property

Fixes https://github.com/systemd/systemd/issues/42581

9 days agocore: add LUOSession= unit setting (#42530)
Luca Boccassi [Fri, 19 Jun 2026 18:35:16 +0000 (19:35 +0100)] 
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.

9 days agomeson: switch version to 262~devel
Luca Boccassi [Fri, 19 Jun 2026 09:16:20 +0000 (10:16 +0100)] 
meson: switch version to 262~devel

9 days agoFinalize meson.version for v261 v261
Luca Boccassi [Fri, 19 Jun 2026 09:12:49 +0000 (10:12 +0100)] 
Finalize meson.version for v261

9 days agoNEWS: finalize
Luca Boccassi [Fri, 19 Jun 2026 09:12:25 +0000 (10:12 +0100)] 
NEWS: finalize

9 days agoNEWS: update contributors list
Luca Boccassi [Fri, 19 Jun 2026 09:12:07 +0000 (10:12 +0100)] 
NEWS: update contributors list

9 days agoUpdate hwdb autosuspend
Luca Boccassi [Fri, 19 Jun 2026 09:09:59 +0000 (10:09 +0100)] 
Update hwdb autosuspend

ninja -C build update-hwdb-autosuspend

9 days agoUpdate hwdb
Luca Boccassi [Fri, 19 Jun 2026 09:09:37 +0000 (10:09 +0100)] 
Update hwdb

ninja -C build update-hwdb

9 days agoRevert "units: drop After=network-online.target from imds services"
Lennart Poettering [Fri, 19 Jun 2026 09:26:30 +0000 (11:26 +0200)] 
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 3f33f4d057506970682e9de4eff06881d678f18a.

9 days agopo: Translated using Weblate (Indonesian)
Arif Budiman [Fri, 19 Jun 2026 17:10:43 +0000 (17:10 +0000)] 
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

9 days agomkosi: copy packaged test-fdstore if not built locally
Nick Rosbrook [Wed, 10 Jun 2026 19:26:47 +0000 (15:26 -0400)] 
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.

9 days agocrypto-util: support OpenSSL 4 (#42655)
Luca Boccassi [Fri, 19 Jun 2026 14:36:43 +0000 (15:36 +0100)] 
crypto-util: support OpenSSL 4 (#42655)

9 days agoFix handling of `UKI/SBAT` and `UKI/Firmware` config entries. (#42478)
Zbigniew Jędrzejewski-Szmek [Fri, 19 Jun 2026 13:16:30 +0000 (15:16 +0200)] 
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.

9 days agocrypto-util: support OpenSSL 4 42655/head
Luca Boccassi [Fri, 19 Jun 2026 11:00:37 +0000 (12:00 +0100)] 
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.

9 days agotest: sha1/sm3/md5 can get build-time disabled in openssl
Luca Boccassi [Fri, 19 Jun 2026 12:32:09 +0000 (13:32 +0100)] 
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 c52a003dc86bb91b2724a00449a50b26009fdfd0

10 days agoupdate NEWS
Lennart Poettering [Fri, 19 Jun 2026 09:49:25 +0000 (11:49 +0200)] 
update NEWS

10 days agocatalog: bound item offsets against the mmap in the binary reader
jmestwa-coder [Sat, 13 Jun 2026 17:58:08 +0000 (23:28 +0530)] 
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.

10 days agocryptsetup: Invalidate ineffective try_discover_key before trying
Will Fancher [Fri, 15 May 2026 01:09:54 +0000 (21:09 -0400)] 
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

10 days agojournalctl: dlopen gcrypt in the --setup-keys path
Luca Boccassi [Thu, 18 Jun 2026 15:46:32 +0000 (16:46 +0100)] 
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 590e22643722cf1268bd24f9056c7115ab0c1cf2

10 days agoupdate TODO 42595/head
Lennart Poettering [Mon, 15 Jun 2026 06:59:44 +0000 (08:59 +0200)] 
update TODO

10 days agoci: add test for the new logic
Lennart Poettering [Mon, 15 Jun 2026 08:39:40 +0000 (10:39 +0200)] 
ci: add test for the new logic

10 days agoreport: turn systemd-report itself into a varlink service
Lennart Poettering [Mon, 15 Jun 2026 08:06:03 +0000 (10:06 +0200)] 
report: turn systemd-report itself into a varlink service

Add a Varlink API for requesting a report.

10 days agoreport: add simple metrics provider that just reads files
Lennart Poettering [Mon, 15 Jun 2026 06:11:32 +0000 (08:11 +0200)] 
report: add simple metrics provider that just reads files

10 days agoreport: add a simple software-backed signing backend
Lennart Poettering [Mon, 15 Jun 2026 06:10:42 +0000 (08:10 +0200)] 
report: add a simple software-backed signing backend

10 days agoreport: add support for optionally signing reports
Lennart Poettering [Sun, 14 Jun 2026 16:46:19 +0000 (18:46 +0200)] 
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.

10 days agoreport: separate report generation from upload
Lennart Poettering [Sun, 14 Jun 2026 05:48:36 +0000 (07:48 +0200)] 
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.

10 days agoreport: don't consider it an error if a backend replies io.systemd.Metrics.NoSuchMetric
Lennart Poettering [Mon, 15 Jun 2026 20:43:23 +0000 (22:43 +0200)] 
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.

10 days agovarlink: also support symlinks in varlink_execute_directory()
Lennart Poettering [Tue, 16 Jun 2026 09:29:16 +0000 (11:29 +0200)] 
varlink: also support symlinks in varlink_execute_directory()

10 days agopo: Added translation using Weblate (Norwegian Bokmål)
arvind froiland [Thu, 18 Jun 2026 11:17:07 +0000 (11:17 +0000)] 
po: Added translation using Weblate (Norwegian Bokmål)

Co-authored-by: arvind froiland <arvind@froiland.no>
11 days agomeson: add -mstackrealign on i386 with musl and libucontext
Yu Watanabe [Wed, 17 Jun 2026 03:25:14 +0000 (12:25 +0900)] 
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)
11 days agocore: add LUOSession= unit setting 42530/head
Luca Boccassi [Tue, 14 Apr 2026 14:22:34 +0000 (15:22 +0100)] 
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.

11 days agostring-util: add STRING_DISALLOW_WHITESPACE for string_is_safe
Luca Boccassi [Tue, 16 Jun 2026 20:55:33 +0000 (21:55 +0100)] 
string-util: add STRING_DISALLOW_WHITESPACE for string_is_safe

Co-developed-by: Claude Opus 4.8 <noreply@anthropic.com>
11 days agomkosi: fix suse build (#42637)
Luca Boccassi [Wed, 17 Jun 2026 12:11:02 +0000 (13:11 +0100)] 
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 db9d7265f5a2fe55e46f8ab408bcff6e0aa97d88

12 days agodocs: Update AI usage policy (#42636)
Christian Brauner [Wed, 17 Jun 2026 11:21:39 +0000 (13:21 +0200)] 
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.

12 days agomkosi: clean up generated rpm pre scripts in suse builds 42637/head
Luca Boccassi [Wed, 17 Jun 2026 10:29:26 +0000 (11:29 +0100)] 
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 db9d7265f5a2fe55e46f8ab408bcff6e0aa97d88

12 days agodocs: Update AI usage policy 42636/head
Daan De Meyer [Wed, 17 Jun 2026 08:10:12 +0000 (08:10 +0000)] 
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.

12 days agomkosi: drop obsolete systemd-boot-debuginfo suse package
Luca Boccassi [Wed, 17 Jun 2026 09:55:47 +0000 (10:55 +0100)] 
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 db9d7265f5a2fe55e46f8ab408bcff6e0aa97d88

12 days agoSteam deck lcd screen is a tablet LCD rotated in the kernel
doof [Mon, 15 Jun 2026 11:28:10 +0000 (07:28 -0400)] 
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

12 days agovmspawn: don't abort VM launch when an optional swtpm fails to start 42634/head
Paul Meyer [Sat, 13 Jun 2026 10:07:45 +0000 (12:07 +0200)] 
vmspawn: don't abort VM launch when an optional swtpm fails to start

When start_tpm() failed under TPM autodetect (arg_tpm <= 0), the swtpm
block logged "Failed to start tpm, ignoring" but then fell through to
event_add_child_pidref() with the still-unset child PidRef. That returns
-ESRCH (PIDREF_NULL fails its pidref_is_set() guard), and the VM launch
fails. Register the child only on start_tpm() success.

Co-developed-by: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Paul Meyer <katexochen0@gmail.com>
12 days agovmspawn: fix QEMU target names for ppc64/mips64el/mipsel hosts
Paul Meyer [Sat, 13 Jun 2026 09:38:02 +0000 (11:38 +0200)] 
vmspawn: fix QEMU target names for ppc64/mips64el/mipsel hosts

architecture_to_qemu_table mapped four 64-bit/LE architectures to wrong
qemu-system-<target> names: MIPS64_LE and MIPS_LE both to "mips" (the BE
MIPS32 target), and PPC64/PPC64_LE to "ppc" (32-bit PowerPC). The string
feeds both find_qemu_binary() ("qemu-system-" + name) and the
firmware.json architecture match, so on those hosts vmspawn looked up a
wrong or nonexistent binary and never matched a firmware descriptor. Map
them to the real targets: mips64el, mipsel, and ppc64 (qemu-system-ppc64
runs LE pSeries guests; there is no qemu-system-ppc64le).

Co-developed-by: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Paul Meyer <katexochen0@gmail.com>
12 days agovmspawn: reject oversized fstab.extra credential before int-cast merge
Paul Meyer [Sat, 13 Jun 2026 09:24:13 +0000 (11:24 +0200)] 
vmspawn: reject oversized fstab.extra credential before int-cast merge

The fstab.extra merge prepends the existing credential via
asprintf("%.*s", (int) existing->size, …). MachineCredential.size is
size_t, so for a credential >INT_MAX the (int) cast yields a negative
precision, which C treats as omitted — turning %.*s into an unbounded
read past the allocation. Reject such a credential up front with EFBIG;
for all realistic sizes the merge is unchanged.

Co-developed-by: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Paul Meyer <katexochen0@gmail.com>
12 days agovmspawn: return negative errno from qemu_config_key()/_section_impl()
Paul Meyer [Sat, 13 Jun 2026 08:57:46 +0000 (10:57 +0200)] 
vmspawn: return negative errno from qemu_config_key()/_section_impl()

errno_or_else() already returns a negative errno, so "return
-errno_or_else(EIO)" returned a positive value on fprintf()/ferror()
failure. Callers checking "r < 0" therefore missed the write error and
treated it as success. Drop the spurious negation; these were the only
two "-errno_or_else" uses in the tree.

Co-developed-by: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Paul Meyer <katexochen0@gmail.com>
12 days agovmspawn: null freed fields and drain subscribers before bridge teardown
Paul Meyer [Sat, 13 Jun 2026 08:37:20 +0000 (10:37 +0200)] 
vmspawn: null freed fields and drain subscribers before bridge teardown

vmspawn_varlink_context_free() discarded the sd_varlink_server_unref()
and vmspawn_qmp_bridge_free() return values, leaving ctx->varlink_server
and ctx->bridge dangling. No current handler reads those fields, but use
the assign-back idiom so the fields are NULL during any synchronous
callback regardless of future changes.

Also drain subscribers before freeing the bridge, so subscriber teardown
can't run against a half-freed bridge.

Co-developed-by: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Paul Meyer <katexochen0@gmail.com>
12 days agovmspawn: reject --initrd= without --linux= for directory boot
Paul Meyer [Sat, 13 Jun 2026 08:01:27 +0000 (10:01 +0200)] 
vmspawn: reject --initrd= without --linux= for directory boot

determine_kernel() ran boot-entry discovery under a !arg_linux guard
only. With --initrd= but no --linux=, discovery overwrote arg_initrds
with the discovered entry's own initrds (leaking the user's strv) and
set arg_linux, so verify_arguments()'s "--initrd= needs --linux=" check,
which runs afterwards, never fired: the user's --initrd= was
silently discarded. Reject the combination before discovery. This also
keeps the discovery store leak-free.

Co-developed-by: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Paul Meyer <katexochen0@gmail.com>
12 days agovmspawn: don't leak prior arg_directory in ephemeral branch
Paul Meyer [Sat, 13 Jun 2026 07:58:53 +0000 (09:58 +0200)] 
vmspawn: don't leak prior arg_directory in ephemeral branch

The ephemeral-snapshot branch did a bare arg_directory = strdup(...),
orphaning the -D/--directory allocation from parse_argv.
Use free_and_strdup(), matching the idiom already used elsewhere in
the file.

Co-developed-by: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Paul Meyer <katexochen0@gmail.com>
12 days agovmspawn: enforce an identifier grammar for QEMU config types/ids/keys
Paul Meyer [Sat, 13 Jun 2026 07:25:28 +0000 (09:25 +0200)] 
vmspawn: enforce an identifier grammar for QEMU config types/ids/keys

qemu_config_section()/qemu_config_key() write section types and keys
unquoted ([type], key = …), but the type check only rejected '\n' while
the structurally identical id/key checks rejected more, even though the
unquoted type slot is the most sensitive. Replace the three ad-hoc
denylists with one allowlist matching QEMU's identifier grammar
([A-Za-z0-9._-], non-empty). This is merely hardening, all callers pass
constant input today.

For the value check use string_is_safe() for now, which is a bit
stricter than QEMUs own config validation.

Add test-vmspawn-qemu-config covering both.

Co-developed-by: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Paul Meyer <katexochen0@gmail.com>
12 days agofix ellipsis buffer overflow in xescape_full and utf8 escapers
jmestwa-coder [Tue, 9 Jun 2026 05:06:58 +0000 (10:36 +0530)] 
fix ellipsis buffer overflow in xescape_full and utf8 escapers

12 days agosd-dlopen: fix build on 'hppa'
Luca Boccassi [Tue, 16 Jun 2026 21:40:20 +0000 (22:40 +0100)] 
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 7590eb0c749090948776ff8c0dbf43c579a55980

Co-developed-by: Claude Opus 4.8 <noreply@anthropic.com>
12 days agomkosi: update debian/suse commit references (#42628)
Zbigniew Jędrzejewski-Szmek [Wed, 17 Jun 2026 06:44:24 +0000 (08:44 +0200)] 
mkosi: update debian/suse commit references (#42628)

12 days agoman/systemd.mstack: fix typos
Ulrich Ölmann [Wed, 17 Jun 2026 05:58:52 +0000 (07:58 +0200)] 
man/systemd.mstack: fix typos

12 days agosysext,sysusers: fix wrong error variable in two error paths
dongshengyuan [Wed, 17 Jun 2026 03:00:49 +0000 (11:00 +0800)] 
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>
12 days agomkosi: update debian commit reference to df071398a62e65b8c975e8a65f81162b46eca8ff 42628/head
Luca Boccassi [Tue, 16 Jun 2026 22:01:13 +0000 (23:01 +0100)] 
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

12 days agomkosi: update opensuse commit reference to 462bd9f5eae8d113d0e477455278f64d0284afe8
Luca Boccassi [Tue, 16 Jun 2026 22:01:33 +0000 (23:01 +0100)] 
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

12 days agomkosi: define ext_man macro in suse rpm build
Luca Boccassi [Wed, 17 Jun 2026 00:22:09 +0000 (01:22 +0100)] 
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

12 days agomkosi: install sysuser-tools in suse build images
Luca Boccassi [Tue, 16 Jun 2026 23:38:40 +0000 (00:38 +0100)] 
mkosi: install sysuser-tools in suse build images

This provides the sysusers RPM macros that the new version
of the spec file uses

12 days agoTODO: add item for btrfs subvolumes in tmpfiles
Zbigniew Jędrzejewski-Szmek [Sat, 13 Jun 2026 08:25:05 +0000 (10:25 +0200)] 
TODO: add item for btrfs subvolumes in tmpfiles

12 days agopo: Translated using Weblate (Kabyle)
ButterflyOfFire [Tue, 16 Jun 2026 18:13:01 +0000 (18:13 +0000)] 
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

12 days agoTEST-64-UDEV-STORAGE: skip multipath test if multipathd.service does not exist
Yu Watanabe [Tue, 16 Jun 2026 14:58:44 +0000 (23:58 +0900)] 
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.

12 days agomeson: bump version to v261~rc4 v261-rc4
Luca Boccassi [Tue, 16 Jun 2026 11:34:11 +0000 (12:34 +0100)] 
meson: bump version to v261~rc4

12 days agoNEWS: update time and place
Luca Boccassi [Tue, 16 Jun 2026 11:33:48 +0000 (12:33 +0100)] 
NEWS: update time and place

12 days agoNEWS: update contributors list
Luca Boccassi [Tue, 16 Jun 2026 11:33:33 +0000 (12:33 +0100)] 
NEWS: update contributors list

12 days agoUpdate hwdb autosuspend
Luca Boccassi [Tue, 16 Jun 2026 11:31:34 +0000 (12:31 +0100)] 
Update hwdb autosuspend

ninja -C build update-hwdb-autosuspend

12 days agoUpdate hwdb
Luca Boccassi [Tue, 16 Jun 2026 11:31:11 +0000 (12:31 +0100)] 
Update hwdb

ninja -C build update-hwdb

12 days agoLUO: only deserialize on boot, add version and structure to JSON payload (#42607)
Luca Boccassi [Tue, 16 Jun 2026 16:55:56 +0000 (17:55 +0100)] 
LUO: only deserialize on boot, add version and structure to JSON payload (#42607)

12 days agohomectl: actually honour --mute-console= (#42617)
Lennart Poettering [Tue, 16 Jun 2026 15:13:29 +0000 (17:13 +0200)] 
homectl: actually honour --mute-console= (#42617)

12 days agocore: fix unit_merge() load state check evaluating after state overwrite
dongshengyuan [Thu, 11 Jun 2026 07:14:49 +0000 (15:14 +0800)] 
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>
12 days agonsresourced: reclaim ranges from dead namespaces during allocation
Daan De Meyer [Wed, 10 Jun 2026 10:06:14 +0000 (10:06 +0000)] 
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>
12 days agocore: add version and structure to LUO json payload 42607/head
Luca Boccassi [Mon, 15 Jun 2026 20:33:08 +0000 (21:33 +0100)] 
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 257c35c1a3936f53b80f16397a6909f4cd81124d

13 days agomkosi: fix escape in suse repackaging script
Luca Boccassi [Tue, 16 Jun 2026 09:31:38 +0000 (10:31 +0100)] 
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 4d0f1451b58dbd4b94da579b800adef4f4e42c34

13 days agomisc: fix minor error handling issues
dongshengyuan [Tue, 16 Jun 2026 06:44:15 +0000 (14:44 +0800)] 
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>
13 days agocore: only attempt to deserialize state from LUO on boot
Luca Boccassi [Mon, 15 Jun 2026 20:34:56 +0000 (21:34 +0100)] 
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 257c35c1a3936f53b80f16397a6909f4cd81124d

13 days agoobs: prepare ParticleOS images in workflow
Luca Boccassi [Thu, 4 Jun 2026 19:20:51 +0000 (20:20 +0100)] 
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.

13 days agogpt-auto-generator: fix error propagation in add_root_mount()
dongshengyuan [Tue, 16 Jun 2026 01:07:25 +0000 (09:07 +0800)] 
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>
13 days agomount: log control command before clearing it in mount_sigchld_event()
dongshengyuan [Tue, 16 Jun 2026 02:38:17 +0000 (10:38 +0800)] 
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>
13 days agoAdd Elecom Huge Plus information for wired usb, wireless usb, and bluetooth
guido [Tue, 16 Jun 2026 03:16:22 +0000 (23:16 -0400)] 
Add Elecom Huge Plus information for wired usb, wireless usb, and bluetooth

13 days agoloop-util: shortcut block device fd when it carries no partition table
Daan De Meyer [Mon, 15 Jun 2026 09:06:42 +0000 (09:06 +0000)] 
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>
13 days agoreport: place Upload() on io.systemd.Report.Uploader rather than io.systemd.Report...
Luca Boccassi [Mon, 15 Jun 2026 21:05:18 +0000 (22:05 +0100)] 
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.

13 days agotools: add script to print blurb for SPI yearly report
Luca Boccassi [Mon, 15 Jun 2026 17:45:37 +0000 (18:45 +0100)] 
tools: add script to print blurb for SPI yearly report

Co-developed-by: Claude Opus 4.8 <noreply@anthropic.com>