Commit Graph
88593 Commits
Author SHA1 Message Date
Luca Boccassi f68fa99a07 TEST-67-INTEGRITY: pre-load crypto modules and skip unsupported algorithms
The test occasionally fails on GHA CI when formatting with xxhash64
because dm-integrity's crypto_alloc_shash() -> request_module() path
flakily fails to load the algorithm:

[   29.172664] TEST-67-INTEGRITY.sh[447]: + for a in crc32c crc32 xxhash64 sha1 sha256
[   29.172664] TEST-67-INTEGRITY.sh[447]: + [[ xxhash64 == crc32 ]]
[   29.172664] TEST-67-INTEGRITY.sh[447]: + test_one xxhash64 0
[   29.172664] TEST-67-INTEGRITY.sh[447]: + integritysetup format /dev/loop0 --batch-mode -I xxhash64 ''
[   29.223383] TEST-67-INTEGRITY.sh[1220]: device-mapper: reload ioctl on temporary-cryptsetup-fa8bebe3-1d87-4796-91e8-abc02c487bb5 (254:0) failed: No such file or directory
[   29.226916] kernel: device-mapper: table: 254:0: integrity: Invalid internal hash (-ENOENT)
[   29.227415] kernel: device-mapper: ioctl: error adding target to table
[   29.231586] TEST-67-INTEGRITY.sh[1220]: Cannot format integrity for device /dev/loop0.

Preload each algorithm's crypto module before use, and skip algorithms
that are not registered in /proc/crypto.

Co-developed-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-11 14:37:08 +01:00
Daan De Meyer 263335518b clang-tidy: Drop unknown gcc compiler args
clang-tidy recently gained support to allow dropping
compiler args from the entries parsed from the compilation
database. Let's make use of this to drop the two compiler
args we use with gcc that clang doesn't support so we can
run clang-tidy on meson build trees configured to use gcc
without getting tons of false positives.
2026-05-11 13:25:12 +01:00
Lennart Poettering dde54e510d fileio: add new read_boolean_file() helper (#41963)
This adds a new read_boolean_file() helper that combines
read_one_line_file() and parse_boolean() into one. 3 call sites are
converted to us it.
2026-05-11 14:16:05 +02:00
Lennart Poettering 4f63cff1f4 tree-wide: port various places to read_boolean_file() 2026-05-11 12:04:02 +02:00
Lennart Poettering db8046535b fileio: add new read_boolean_file() helper 2026-05-11 12:04:02 +02:00
Lennart Poettering 1b8a2b6abe fileio: teach read_one_line_file_at() XAT_FDROOT support 2026-05-11 12:04:02 +02:00
Ambareesh Balaji 20594fdd6e elf-util: pass exectable path to dwfl_core_file_report
Without it, stack trace symbols fail to resolve with .gnu_debuglink
split debug info.
2026-05-11 10:57:31 +01:00
favilances 87d282a73d test-path-util: add coverage for path edge cases
Path utility helpers are used throughout systemd for validation, comparison and manipulation of filesystem paths. Add coverage for additional corner cases around absolute path detection, normalization and prefix matching so regressions in these common helpers are easier to catch.

Co-developed-by: OpenAI Codex <noreply@openai.com>
Signed-off-by: favilances <favilances@proton.me>
2026-05-11 10:23:37 +01:00
Luca Boccassi 0bf094b763 test: bump TEST-58-REPART timeouts with sanitizers
The test is flaky under sanitizers as the timeouts seem to be too short,
bump them like we do in other tests to try and make it more robust when
running with sanitizers
2026-05-11 11:15:35 +02:00
Luca Boccassi d3f436aa10 test: fix flaky TEST-07-PID1.socket-defer.sh
The socket's SubState transitions from 'running' to 'listening' shortly
after the triggered service becomes inactive, so the assert can race and
observe the stale 'running' state:

[ 1882.425335] systemd[1]: TEST-07-PID1-socket-defer-23279.service: Changed dead -> running
[ 1882.495150] TEST-07-PID1.sh[20535]: ++ systemctl show TEST-07-PID1-socket-defer-23279.socket -P SubState
[ 1882.514239] TEST-07-PID1.sh[20509]: + assert_eq running listening
[ 1882.510529] systemd[1]: TEST-07-PID1-socket-defer-23279.socket: Flushing socket before listening.
[ 1882.510559] systemd[1]: TEST-07-PID1-socket-defer-23279.socket: Changed running -> listening

Poll for 30s instead of directly asserting to try and make it more robust
2026-05-11 10:59:00 +02:00
Luca Boccassi cd57308303 test: workaroud flaky TEST-53-TIMER.restart-trigger against journald cgroup attribution race
The restart-trigger subtest occasionally fails on CI with:

    + assert_eq 0 1
    FAIL: expected: '1' actual: '0'

even though the timer fires correctly and the echo message is in fact
written to the journal. The failure happens because the test relies on
`journalctl --unit=$UNIT_NAME` to find the message, and that filter is
based on the cgroup journald looks up for the writer PID at the time
the stdout message is received.

For very short-lived processes spawned via systemd-executor (like
`echo`), that lookup is racy: the writer's `/proc/$PID/cgroup` can
still resolve to `/init.scope` (systemd-executor's own cgroup) rather
than the service's cgroup, so the message ends up attributed to
`init.scope` and `--unit=` filtering misses it.

    __CURSOR=s=6f90ff5b6a0e47c3a527a9b4892af965;i=f8ed;b=3dad0cc689a04781879e4dd846d24432;m=17703dc;t=6513be1be2506;x=8d3009a687724b5e
    __REALTIME_TIMESTAMP=1778167492519174
    __MONOTONIC_TIMESTAMP=24576988
    __SEQNUM=63725
    __SEQNUM_ID=6f90ff5b6a0e47c3a527a9b4892af965
    _BOOT_ID=3dad0cc689a04781879e4dd846d24432
    _HOSTNAME=H
    PRIORITY=6
    SYSLOG_FACILITY=3
    _UID=0
    _GID=0
    _CAP_EFFECTIVE=1ffffffffff
    _SYSTEMD_CGROUP=/init.scope
    _SYSTEMD_UNIT=init.scope
    _SYSTEMD_SLICE=-.slice
    _EXE=/usr/lib/systemd/systemd-executor
    _TRANSPORT=stdout
    _COMM=18
    _MACHINE_ID=89ef83adc0bc4a33a83a227201b57203
    _RUNTIME_SCOPE=system
    _PID=816
    _CMDLINE=/usr/lib/systemd/systemd-executor --deserialize 50 --log-level debug,console:info --log-target journal-or-kmsg
    _STREAM_ID=8e8e4166c99e40afaa58bcd04a50a7f4
    SYSLOG_IDENTIFIER=echo
    MESSAGE=Hello from timer 29581

Note _SYSTEMD_UNIT=init.scope / _SYSTEMD_CGROUP=/init.scope on the
echo output: this is what causes `--unit=timer-restart-14362` to
return 0 hits. The test failure logs from the same run confirm this:

    + JOURNAL_TS=1778160292
    + journalctl -p info --since=@1778160292 --unit=timer-restart-14362 '--grep=Hello from timer 29581'
    -- No entries --
    + systemctl restart timer-restart-14362.timer
    ...
    + date '--set=+2 hours'
    Thu May  7 15:24:52 UTC 2026
    + sleep 1
    ...
    echo[816]: Hello from timer 29581
    ...
    ++ journalctl -q -p info --since=@1778160292 --unit=timer-restart-14362 '--grep=Hello from timer 29581'
    ++ wc -l
    + assert_eq 0 1
    FAIL: expected: '1' actual: '0'

For comparison, in a passing local run the same message is attributed
correctly to the service unit (_SYSTEMD_UNIT=timer-restart-24147.service),
so `--unit=` matches.

Work around the underlying journald race in the test by setting an
explicit `SyslogIdentifier=` on the service and matching with `-t` plus
the unique grep pattern: `SyslogIdentifier` is carried over the stdout
stream protocol and is not affected by the cgroup lookup race.

Co-developed-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-11 10:57:46 +02:00
Christian Brauner 5f99e126dc test: make TEST-07-PID1.user-namespace-path more robust (#42001)
The test occasionally fails because lsns returns empty output for the
transient unit, even though the process is running. e.g.:

```
    [ 1843.556046] TEST-07-PID1.sh[8560]: + systemd-run --unit=newservice --property=Type=exec --property=UserNamespacePath=/proc/8608/ns/user --property=NetworkNamespacePath=/proc/8608/ns/net sleep 3600
    [ 1844.205927] TEST-07-PID1.sh[8616]: ++ systemctl show newservice -p MainPID
    [ 1844.221425] TEST-07-PID1.sh[8618]: ++ lsns -p 8608 -o NS -t net -n
    [ 1844.229653] TEST-07-PID1.sh[8619]: ++ lsns -p 8614 -o NS -t net -n
    [ 1844.235563] TEST-07-PID1.sh[8620]: FAIL: expected: '' actual: '4026532522'
```

This could be a race, so switch to Type=notify to try and make it more
robust.

eg:
https://github.com/systemd/systemd/actions/runs/25485775345/job/74780837128?pr=41974
2026-05-11 10:16:12 +02:00
Matheus Afonso Martins Moreira b7be9ccc8f hwdb/keyboard: fix KP_Enter on Clevo PA70ES
The ITE keyboard controller firmware (version 0xAB83) is shared
between the Clevo PA70ES and the X+ piccolo series.

The piccolo's hwdb rule matches by input device ID
(evdev:input:b0011v0001p0001eAB83*) and remaps scan code 0x9c
(KP_Enter) to Enter, since the piccolo has no numpad and its
main Enter key sends the wrong scan code.

The Clevo PA70ES has a real numpad. The piccolo rule matches it
because both laptops use the same ITE controller firmware, which
breaks KP_Enter on the PA70ES.

Add a DMI-specific override that restores KEY_KPENTER for 0x9c
on the PA70ES.

The piccolo rule should ideally be narrowed to use DMI matching
instead of input device ID to avoid catching other laptops with
the same ITE controller firmware.
2026-05-09 18:08:27 +01:00
Petru Rebeja 601bf4cb87 po: Translated using Weblate (Romanian)
Currently translated at 68.7% (183 of 266 strings)

Co-authored-by: Petru Rebeja <petru@rebeja.eu>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/ro/
Translation: systemd/main
2026-05-09 11:28:34 +01:00
Valentin David 89148192f8 tmpfiles: Add commands for file capabilites 2026-05-09 11:36:55 +02:00
Todd Zullinger ba93240758 man/tmpfiles: fix missing 'as' in %t details column
This was missing when the details were added in 5a8575ef01 (tmpfiles:
also add %t/%S/%C/%L specifiers, 2017-11-23).
2026-05-09 00:55:34 +01:00
Daan De Meyer 73fd578f86 mkosi: drop libucontext again
Turns out it's possible to implement fibers without unnecessary
system calls and without ucontext.h so there's no need for libucontext
anymore, so drop it from the package list.
2026-05-08 22:38:31 +01:00
albertescanes 9bbadefe43 man: update Fedora image name in vmspawn example
Update the Fedora Cloud image name to the current one and use
importctl instead of machinectl.
2026-05-08 23:35:34 +02:00
Zbigniew Jędrzejewski-Szmek 0cc6e29838 Convert userdbctl to option macros (#41991) 2026-05-08 23:34:24 +02:00
Luca Boccassi 7af304d601 test: make TEST-07-PID1.user-namespace-path more robust
The test occasionally fails because lsns returns empty output for
the transient unit, even though the process is running. e.g.:

    [ 1843.556046] TEST-07-PID1.sh[8560]: + systemd-run --unit=newservice --property=Type=exec --property=UserNamespacePath=/proc/8608/ns/user --property=NetworkNamespacePath=/proc/8608/ns/net sleep 3600
    [ 1844.205927] TEST-07-PID1.sh[8616]: ++ systemctl show newservice -p MainPID
    [ 1844.221425] TEST-07-PID1.sh[8618]: ++ lsns -p 8608 -o NS -t net -n
    [ 1844.229653] TEST-07-PID1.sh[8619]: ++ lsns -p 8614 -o NS -t net -n
    [ 1844.235563] TEST-07-PID1.sh[8620]: FAIL: expected: '' actual: '4026532522'

This could be a race, so switch to Type=notify to try and make it more robust.
2026-05-08 18:05:03 +01:00
Zbigniew Jędrzejewski-Szmek c0cda5d91c userdbctl: fix erroneous errno
Fixes 1604937f83.
2026-05-08 17:25:41 +02:00
Ivan Kruglov d0c912899a test: add missing varlink IDL enum tests for Job and ServiceType
PR #41583 (io.systemd.Unit.StartTransient) introduced several new varlink IDL enum types without corresponding enum consistency tests:

- JobType, JobState, JobResult in the new io.systemd.Job interface
- ServiceType in the Unit interface's ServiceContext

Add a new test-varlink-idl-job test file covering all three Job enums, and add ServiceType coverage to the existing test-varlink-idl-unit test. Export vl_type_ServiceType (was static) so it can be referenced from the test.

Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-08 17:22:04 +02:00
Frantisek Sumsal 480449db85 machine: require normalized paths in Copy* D-Bus/Varlink methods
Also, do the same for the Varlink BindMount method, since its D-Bus
counterpart already does it.
2026-05-08 17:20:37 +02:00
Zbigniew Jędrzejewski-Szmek b2c6cc6a8e userdbctl: actually implement option parsing stop after --chain
The basic idea is that --chain should stop option parsing. But
previously this didn't work, so --chain could be specified anywhere
in the command line. To maintain with compatibility with that,
allow --chain to be specified anywhere until the first positional
arg or option in the command string. This allows options to be passed
in the expected fashion:
  userdbctl --chain ssh-authorized-keys user cmd --opt1 --opt2
  userdbctl --chain ssh-authorized-keys user -- cmd --opt1 --opt2
but also allows the invocations which worked previously:
  userdbctl ssh-authorized-keys user --chain cmd
  userdbctl ssh-authorized-keys user cmd --chain

Fixes 8072a7e6a9.

The error messages are extended a bit. "binary path" is misleading:
we support all kinds of executables, not only compiled programs.
2026-05-08 17:15:57 +02:00
Zbigniew Jędrzejewski-Szmek cb8359877e userdbctl: convert to OPTION and VERB macros
The situation with --chain is complicated. The old code tried to use "+…"
in getopt_long() to stop option parsing. But it didn't actually work.
This logic was originally added in 8072a7e6a9.
ef9c12b157 added an comment about 'optind=0'
which explains why the code doesn't work, but the code wasn't changed.

To wit:
$ userdbctl.old --no-pager --chain ssh-authorized-keys zbyszek -- /bin/echo --asdf
--asdf
$ userdbctl.old --no-pager --chain ssh-authorized-keys zbyszek /bin/echo -- --asdf
--asdf
$ userdbctl.old --no-pager --chain ssh-authorized-keys zbyszek /bin/echo --asdf
userdbctl.old: unrecognized option '--asdf'
(Basically, if "--" is used, it can be anywhere, since getopt_long() doesn't do
anything special after --chain and looks for the next option. There were some
tests of --chain, but they all used the username as the positional argument, so
it wasn't misinterpreted as an option.)

This behaviour is preserved in the conversion.

--help is generally the same except for expected formatting changes.
--json= is moved above between --output= and -j. For some reason it was
further down.

Co-developed-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-08 15:52:10 +02:00
Luca Boccassi 244d80bbf8 test: try to make TEST-04-JOURNAL.journalctl-varlink less flaky
The io.systemd.JournalAccess server occasionally returns NoEntries for a
unit-filter query right after the unit logged its message, e.g. from a
failing CI run:

 [ 1204.967910] TEST-04-JOURNAL.sh[15025]: ++ varlinkctl call --more /run/systemd/io.systemd.JournalAccess io.systemd.JournalAccess.GetEntries '{"units": ["test-journalctl-varlink-1-13583.service", "test-journalctl-varlink-2-25039.service"]}'
 [ 1205.017361] journalctl[15026]: varlink-3-3: Received message: {"method":"io.systemd.JournalAccess.GetEntries","parameters":{"units":["test-journalctl-varlink-1-13583.service","test-journalctl-varlink-2-25039.service"]},"more":true}
 [ 1205.017498] journalctl[15026]: Failed to open journal file /var/log/journal/ce54feb228124e639f3b7779beeaff60/system.journal: No data available
 [ 1205.017823] journalctl[15026]: varlink-3-3: Sending message: {"error":"io.systemd.JournalAccess.NoEntries"}
 [ 1205.017936] TEST-04-JOURNAL.sh[15025]: Method call failed: io.systemd.JournalAccess.NoEntries
 [ 1205.499083] TEST-04-JOURNAL.sh[146]: Subtest /usr/lib/systemd/tests/testdata/units/TEST-04-JOURNAL.journalctl-varlink.sh failed

Wrap the calls that expect data in a helper that retries up to 3 times on
NoEntries, syncing the journal between attempts.

Follow-up for a109189fab

Co-developed-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-08 12:01:06 +01:00
Zbigniew Jędrzejewski-Szmek 576ca62b9b userdbctl: split out parse_from_file()
parse_from_file doesn't set arg_from_file itself, but returns a
sd_json_variant ref to the caller. I think the change of arg_from_file
is more readable with this structure.
2026-05-08 12:17:53 +02:00
Zbigniew Jędrzejewski-Szmek 88d7e44392 Add json_variant_unref_and_replace and use it where appropriate
JSON_VARIANT_REPLACE is similar, but doesn't try to nullify the second
arg, so it can be used with an inline expression.
2026-05-08 11:36:43 +02:00
Dirga Yuza f2361469e4 hwdb: add force-release to Nitro AN515-58 backlight keys
This fixes an incomplete mapping introduced in PR #39769 for the Acer
Nitro 5 AN515-58.

The previous PR mapped the physical keyboard backlight keys (scancodes
`0xef` and `0xf0`) to `kbdillumup` and `kbdillumdown` to prevent them
from dropping screen brightness.

However, the embedded controller on this Acer model only emits "make"
(press) scancodes and fails to emit "break" (release) scancodes for
these specific keys. Without a release event, the input subsystem
registers the keys as continously held down (auto-repeat). In desktop
environments like KDE Plasma, pressing the key once causes the
brightness UI slider to get stuck in an infinite adjustment loop.

This issue is previously unnoticed as this model did not expose any
keyboard backlight control.

The fix is done by prepending the `!` (force-release) flag to the
keycodes. This instructs `evdev` to synthesize a key
release event.

The fix is verified locally on an Acer Nitro AN515-58. `evtest` now
correctly reports `value 1` immediately followed by `value` 0, and KDE
Plasma brightness OSD no longer gets stuck.

Signed-off-by: Dirga Yuza <dirgayuza123@gmail.com>
2026-05-08 10:21:46 +01:00
Zbigniew Jędrzejewski-Szmek f3ee3510a3 sd-dhcp-client: avoid taking and dropping a reference
The helper would create a new ref, even though we had one handy
and didn't need to create a new ref. So change the helper to
take an existing reference.
2026-05-08 11:14:32 +02:00
Zbigniew Jędrzejewski-Szmek 62a489fbf9 tree-wide: rename unref_and_replace_full to unref_and_replace_new_ref
We have a number of *_unref_and_replace macros. One could think that
they are like the various free_and_replace variants, but they actually
create a new ref to the passed object. The free_and_replace variants
take ownership of the argument. This inconsistency is surprising. Rename
all those functions to have "_new_ref" at the end to make the difference
clear.
2026-05-08 11:14:13 +02:00
Daan De Meyer 174f6f3595 Convert resolvectl to option and verb macros (#41978)
This was one quite involved because some preparatory work was needed and
there are three parsers in the same binary.
2026-05-07 21:03:38 +02:00
Zbigniew Jędrzejewski-Szmek 366071143d resolvconf-compat: convert to OPTION macros
Use the "resolvconf" namespace to keep these options separate from the
resolvectl/systemd-resolve sets.

Co-developed-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-07 18:39:34 +02:00
Zbigniew Jędrzejewski-Szmek 7cea71e4c1 resolvectl: convert to OPTION and VERB macros
Use OPTION_NAMESPACE() to keep the resolvectl and systemd-resolve
option sets separate. The resolvconf-compat path (resolvconf
invocation) keeps its own getopt-based parsing.

--help output has the expected changes to formatting. Synopis
for [status] is now shows that the verb is optional.

Co-developed-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-07 18:39:32 +02:00
Zbigniew Jędrzejewski-Szmek 4e20d61c65 shared/verbs: when showing default verb, put [] around the args too
The verb cannot be omitted but the args kept, so:
  resolvectl [status] [link]
is wrong, we need:
  resolvectl [status [link]]

Fixes f94da4b4c5.
2026-05-07 18:39:04 +02:00
Zbigniew Jędrzejewski-Szmek d865863929 resolvectl: move verb implementations to match order in --help 2026-05-07 18:39:04 +02:00
Zbigniew Jędrzejewski-Szmek df24074bb5 resolvectl: move things around in --help
Move the "display options" to the end of both --help strings and then
reorder the implementation to match.
2026-05-07 18:39:02 +02:00
Zbigniew Jędrzejewski-Szmek 16c3c69be3 resolvectl: split out parse_protocol 2026-05-07 18:37:48 +02:00
Daan De Meyer 73622e0111 Convert more programs to option+verb macros (#41974)
Just a handful are left! This is one of the final batches.
2026-05-07 18:02:09 +02:00
Luca Boccassi d4bc62713e test: fix flaky testcase_15_wait_online_dns in TEST-75-RESOLVED
The test used `timeout 30 bash -c "journalctl -b -u $unit -f | grep -m1 ..."`
to wait for systemd-networkd-wait-online to log that no DNS server is
accessible. The expected message is actually emitted ~1s after the unit
starts, but `grep -m1` exiting doesn't tear down `journalctl -f`: journalctl
only notices the closed pipe on its next write, which may never happen for
an otherwise idle unit. The pipeline therefore hangs until the 30s timeout
fires, eventually causing the test to fail.

Replace the follow+pipe with a polling `journalctl --grep` loop, which
exits cleanly as soon as the message lands in the journal.

Logs from the failing run:

  [ 2650.871441] systemd-networkd-wait-online[2190]: dns0: No DNS configuration yet
  [ 2651.723180] systemd-networkd-wait-online[2190]: dns0: No DNS server is accessible.
  [ 2680.909048] systemd-networkd-wait-online[2190]: json-stream: Got POLLHUP from socket.
  [ 2680.909092] systemd-networkd-wait-online[2190]: DNS configuration monitor disconnected, reconnecting...
  [ 2680.914368] systemd-networkd-wait-online[2190]: Failed to connect to io.systemd.Resolve.Monitor: Connection refused
  [ 2681.966674] systemd-networkd-wait-online[2190]: dns0: No DNS server is accessible.
  [ 2681.969527] systemd-networkd-wait-online[2190]: Failed to connect to io.systemd.Resolve.Monitor: Connection refused
  [ 2682.077032] systemd[1]: Stopping wait-online-dns-0f9e4f6d-8b34-4cff-b2da-03612ca731e8.service - [systemd-run] /usr/lib/systemd/systemd-networkd-wait-online --timeout=0 --dns --interface=dns0...

Co-developed-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-07 14:36:00 +02:00
Zbigniew Jędrzejewski-Szmek 355f2bec79 mount: stop showing mount options for systemd-unmount
This only serves to confuse the user.
2026-05-07 13:11:50 +02:00
Zbigniew Jędrzejewski-Szmek 561f3a65da mount: convert to OPTION macros
Previously, we'd show a partial synopsis for systemd-mount
in --help for systemd-umount. I don't think it makes sense to do that.
So now the --help for systemd-umount is separate, with just its syntax
and a new blurb.

"transiently" is dropped from the description. Mount points generally
are transient, so no need to say that. (E.g. the man page for mount just
says "attach" and "detach".)

Co-developed-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-07 13:11:50 +02:00
Zbigniew Jędrzejewski-Szmek b49a4daa1b coredumpctl: convert to OPTION and VERB macros
The order of options is changed (to what was present in parse_argv).
I don't the order in --help was mostly random, as is the new one,
so I didn't try to preserve the old order. Some help strings are
reworded/adjusted.

Co-developed-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-07 13:11:50 +02:00
Zbigniew Jędrzejewski-Szmek a42f1ebb94 report-cgroup-server: convert to OPTION macros
Co-developed-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-07 13:11:50 +02:00
Zbigniew Jędrzejewski-Szmek de29e61843 portablectl: actually allow set-limit with one arg
In the man page and in the actual code, the first arg is
optional. But the arg limit in the verbs table did not allow
only one arg to be specified.

Fixes: 61d0578b07
2026-05-07 13:11:50 +02:00
Paul Meyer 67e23e0e05 vmspawn: search XDG_DATA_DIRS for QEMU firmware
get_firmware_search_dirs() previously hardcoded /usr/share/qemu/firmware
as the only system-wide search path. That assumption breaks on
distributions that deliberately do not populate /usr/share, making
vmspawn fail: "Failed to find OVMF config: No such file or directory".
NixOS exposes those firmware locations through XDG_DATA_DIRS.

Extend the search list with XDG_DATA_HOME/XDG_DATA_DIRS. This is the
standard XDG mechanism and is already what QEMU itself uses for the same
descriptors, so behavior matches user expectations across tooling.

To avoid regressing setups where user has set XDG_DATA_DIRS to a custom
value that omits /usr/share, keep /usr/share/qemu/firmware as an
unconditional fallback.

Precedence is unchanged: XDG_CONFIG_HOME/qemu/firmware still wins
over /etc/qemu/firmware, which still wins over any shared-data dir.

Co-developed-by: Claude Opus 4.7 <noreply@anthropic.com>
Signed-off-by: Paul Meyer <katexochen0@gmail.com>
2026-05-07 10:33:01 +02:00
Nita Vesa f0a171d1d8 hwdb: add Fn-key mappings for MSI GE76 Raider 10UG 2026-05-06 19:20:04 +01:00
Frantisek Sumsal a7e276a82f dbus: limit the number of env variables to something reasonable, vol. 3
Let's limit the number of environment variables when creating a
transient unit via StartTransientUnit as well, since validating the
environment variable names/assignments is expensive.

Follow-up for 49c1e1bcf2.
2026-05-06 16:34:32 +01:00
Christian Brauner 5c03431107 vmspawn: reject --bind-volume= duplicates at parse time (#41961)
bind_volume_parse() does not look at peers, so passing the same
PROVIDER:VOLUME twice on the command line silently produces two parsed
entries in arg_bind_volumes. vmspawn_bind_volume_acquire() then builds
two DriveInfo with identical d->id ("<provider>:<volume>"). At boot,
bridge_register_drive() puts d->id into the b->block_devices hashmap;
the second insert returns -EEXIST and the user sees a bare "File exists"
with no context for which volume is responsible.

Reject the collision at the parse site with a linear scan over the
existing array — n_items is small (one entry per --bind-volume on the
command line), and a clear error message naming the offending volume is
much more useful than the late EEXIST from the QMP setup loop.
2026-05-06 16:46:42 +02:00
Lennart Poettering a5004653ac update TODO 2026-05-06 16:20:02 +02:00