Commit Graph

84005 Commits

Author SHA1 Message Date
Peter Hutterer
5b647b84a9 rules: extend 60-input-id.rules to allow for bus/vid/pid/name matches
Same approach as used in 70-mouse.rules, allow for a name-based match
optionally combined with bus/vid/pid (which the existing modalias rule
would already allow us anyway). Note that ID_BUS isn't assigned until
after this rule has run so we need to use the id/bustype attribute
directly.

Related to https://github.com/systemd/systemd/issues/36677
2025-10-20 14:14:39 +10:00
Lennart Poettering
dfb46b906e add two new json dispatchers (#39237)
Split out of #38764. But the 2nd one at least makes sense on its own I
guess.
2025-10-07 20:58:06 +02:00
Lennart Poettering
7757de9f20 json-util: don't use assert_return()
assert_return() exists for gracefully handling programmng errors in
public APIs. But these are internal APIs, hence just use a tough
assert().
2025-10-07 18:57:28 +02:00
Lennart Poettering
b7c07f6ab4 json: add generic dispatchers for version strings 2025-10-07 18:57:01 +02:00
Lennart Poettering
a8f5ae28d8 json: add new json_dispatch_strv_path() helper 2025-10-07 18:57:01 +02:00
Mike Yuan
e4c0741bef basic/log-context: mark global vars as static 2025-10-07 15:53:45 +02:00
Zbigniew Jędrzejewski-Szmek
4a8c41f3eb licensing: update address of FSF
rpmlint complains about the old address, even though it totally
doesn't matter and nobody cares.
2025-10-07 13:00:12 +01:00
Lennart Poettering
9bb47f9ce9 bootspec: also process uki-url boot loader spec field
Let's also add support for "uki-url", which was added at the same time to
the spec as "uki".

Follow-up for: 4a94a1b83f
2025-10-06 16:12:27 +02:00
Lennart Poettering
e4201d0a0e sysctl: support reading configuration from stdin and command line arguments (#39219)
This makes systemd-sysctl support following syntax, like
systemd-sysusers and systemd-tmpfiles:
```sh
$ /usr/lib/systemd/systemd-sysctl --inline 'foo.bar=42'
$ /usr/lib/systemd/systemd-sysctl - <<EOF
foo.bar=42
EOF
```
2025-10-06 16:12:11 +02:00
Antonio Alvarez Feijoo
13abd21c9f mute-console: remove unimplemented option
```
$ build/systemd-mute-console -q
Code should not be reached at src/mute-console/mute-console.c:103, function parse_argv(). Aborting. 💥
Aborted (core dumped)
```
2025-10-06 16:11:39 +02:00
Daan De Meyer
f0a1b3c183 copilot: Tell the AI to be thorough
At least when doing a local review, asking it to be thorough results
in a lot more comments on coding style violation so let's add such an
instruction to the global instructions.
2025-10-06 20:06:03 +09:00
Daan De Meyer
f228115a69 docs: Mention newline requirement for multi-line function decl 2025-10-06 20:06:03 +09:00
Mike Yuan
03bdf74dcf timesync: several cleanups (#39220)
Prompted by the logs provided at
https://github.com/systemd/systemd/issues/36498#issuecomment-3369227155.
2025-10-06 12:16:47 +02:00
Daan De Meyer
f28fb7836f Add copilot instructions
This was generated using copilot itself with Claude Sonnet 4.5 as
the backing model.

The idea is to test this out on some PRs to see whether copilot can
provide useful PR reviews. The idea is that it'll be able to take care
of the low hanging fruit like coding style issues and such. Once we get
some feedback on how it performs, we can make more changes to this document
to get it to behave better (assuming we decide to keep using it at all).
2025-10-06 11:44:20 +02:00
Luca Boccassi
29c639887a mkosi: update debian commit reference to e50fce1d4b2a9f1bb990027de8e86603f3b42301
* e50fce1d4b Fix installation of new manpages
* 8b45d3d793 Install new files for upstream build
* a401468f75 autopkgest: install bsdutils and bsdextrautils for unit tests
* 587584577e Explicitly disable bpf-framework for stage1 builds
* 209a8475d9 systemd: recommend login package
2025-10-05 22:11:40 +01:00
Jelle van der Waa
42e543408b varlinkctl: add detailed error message when --more is needed
Instead of reporting a "Invalid exchange", tell the user the `--more`
flag is missing.

Closes: #39201
2025-10-05 22:14:50 +02:00
Yu Watanabe
2de03c8e8b test: add test cases for sysctl reading configuration from stdin or positional arguments 2025-10-06 04:55:25 +09:00
Yu Watanabe
3cc725ca6b timesync: assume link NTP servers are unchanged on error and no servers registered yet
This also silences annoying debug message when networkd is not running,
in which case sd_network_get_ntp() returns -ENOENT.
2025-10-06 04:49:53 +09:00
Yu Watanabe
a6b5e24746 timesync: drop redundant space 2025-10-06 04:49:53 +09:00
Yu Watanabe
ff7a3522df sd-bus: silence spurious debugging log message 2025-10-06 04:49:53 +09:00
Yu Watanabe
862b61a3a1 test: merge TEST-76-SYSCTL into TEST-87-AUX-UTILS-VM 2025-10-06 03:26:28 +09:00
Yu Watanabe
ef6aa2351e sysctl: add --inline option
This maybe useful to apply a simple configuration without creating conf
file.
2025-10-06 03:17:23 +09:00
Yu Watanabe
483de0e76b sysctl: port parse_file() over conf_file_read()
Then, systemd-sysctl can also support stdin and relative paths, like
systemd-sysusers and systemd-tmpfiles do.
2025-10-06 03:05:59 +09:00
Yu Watanabe
abb7a04361 sysctl: assorted coding style cleanups 2025-10-06 02:55:53 +09:00
Yu Watanabe
a81259051c sysctl: shorten code a bit 2025-10-06 02:41:15 +09:00
Yu Watanabe
b65ddc64e0 sysctl: propagate failures in parsing credential files
We already propagate failures in parsing conf files in usual places, or
given by command arguments. Let's make the behavior consistent.
2025-10-06 02:30:28 +09:00
Yu Watanabe
e134b7fdd2 sysctl: prettify help message 2025-10-06 02:30:28 +09:00
Yu Watanabe
95c71c8f6e sysctl: add missing help entry for --strict
Follow-up for e88748c17e.
2025-10-06 02:30:28 +09:00
Luca Boccassi
6602a5f720 mkosi: pull in new knot package for TEST-75-RESOLVED
5728s TEST-75-RESOLVED.sh[439]: /usr/lib/systemd/tests/testdata/units/TEST-75-RESOLVED.sh: line 154: keymgr: command not found

The command was split out into a new package
2025-10-05 17:20:29 +01:00
Guido Günther
01703b7761 NEWS: Document new uaccess udev rule priority requirement
Closes: https://github.com/systemd/systemd/issues/39206

Signed-off-by: Guido Günther <agx@sigxcpu.org>
2025-10-05 15:47:22 +02:00
jsks
fc890aedd3 mam: add sd_bus_track_handler_t signature to manpage (#39204)
This is consistent with how the other handler/callback types are
documented.
2025-10-05 19:00:22 +09:00
Yu Watanabe
b49bff0da7 shared/bootspec: don't warn for new loader.conf options and correctly parse new uki and profile boot entry options (#39165)
Commit e2a3d56218 added the `uki` option
to sd-boot, and 1e9c9773b9 added
`profile`, but because these were not added in src/shared/bootspec,
bootctl still shows warnings like `Unknown line 'uki', ignoring.` when
parsing the config. This PR allows parsing and displaying them correctly
in `bootctl` output. It also stops it from printing a warning for any of
the new `loader.conf` options (`log-level`, `reboot-on-error`, etc.).
Note that `uki-url` is still not handled as I can't easily test it.
2025-10-04 23:35:54 +02:00
Zbigniew Jędrzejewski-Szmek
60597825ef man/sd-login: minor grammar updates 2025-10-04 23:26:47 +02:00
Zbigniew Jędrzejewski-Szmek
4a3620c55a man: fix advice regarding thread safety of libsystemd
The prohibition to move libsystemd objects between threads was added in
64a7ef8bc0 ('man: be more explicit about thread
safety of sd_journal'). At the time, this was valid, because we were using the
mempool for allocation and it apparently didn't handle access from different
threads. Sadlly, the commit links to a bugzilla entry referenced in the commit
is not publicly visible anymore, so the details are murky. But we stopped using
the mempool in a5d8835c78 ('mempool: only enable
mempool use when linked to libsystemd-shared.so'), with subsequent followup in
b01f31954f ('Turn mempool_enabled() into a weak
symbol'). The restriction added in the man page is not necessary since then.

The text in the man page was arguably incorrect in calling the code
"thread-agnostic". If the code does not support being touched from threads at
all and has global state to tied to the main thread, it is not "agnostic", but
just doesn't support threads.

(I'm looking into https://github.com/systemd/python-systemd/issues/143, and
with the current scheme, the python-systemd module and all python code using
libsystemd would be very hard to use. With the change to free-threaded python
in python3.13, i.e. the replacement of single Global Interpreter Lock by
locking on individual objects, this limitation would become even more
constraining.)
2025-10-04 23:26:47 +02:00
Yu Watanabe
5fc94cc6d9 Use string tables to parse option arguments (#39173) 2025-10-04 23:16:12 +02:00
val4oss
b8efd65975 TEST-74-AUX-UTILS: use sshd_config.d
* From the TEST-74-AUX-UTILS.ssh.sh writing directly into
  /etc/ssh/sshd_config can hide config from distro using /usr/etc.
* Using directory configuration /etc/ssh/sshd_config.d/* suits for all
  cases.

Signed-off-by: val4oss <val4oss@pm.me>
2025-10-04 23:00:31 +02:00
Yu Watanabe
273cb33b61 man: fix typo
Follow-up for 91214a37ef.
Fixes #39203.
2025-10-05 05:45:21 +09:00
Yu Watanabe
9ce3ef1304 meson: add man and html targets (#39207) 2025-10-04 22:41:58 +02:00
Oğuz Ersen
5fd9939789 po: Translated using Weblate (Turkish)
Currently translated at 100.0% (264 of 264 strings)

Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/tr/
Translation: systemd/main
2025-10-04 22:39:07 +02:00
Zbigniew Jędrzejewski-Szmek
1e737d44d1 meson: add target aliases 'man' and 'html'
Previously we would need to say 'ninja -C build man/man man/html', now
just 'ninja -C build man html'.
2025-10-04 18:13:27 +02:00
Zbigniew Jędrzejewski-Szmek
29832663dc meson: drop remaining target names
Most of those were dropped in 7d247d3cb8. I left
behind the few cases where the 'output' name was different from the target name.
But we actually don't need those either, so get rid of those. (And one case
where I missed the name argument.)

No functional change, except that e.g. 'ninja -C build update-man-rules-impl'
doesn't work, but I hope nobody was using that.
2025-10-04 18:13:27 +02:00
Zbigniew Jędrzejewski-Szmek
675bfef837 Stop specifying license for generated file, instead mark as generated
I exclude generated files from license check, and I noticed
that this file was marked with a license header, which doesn't
make much sense, it is not copyrightable.
2025-10-04 18:13:27 +02:00
Zbigniew Jędrzejewski-Szmek
ea44302b29 meson: using f-strings in meson
Those were added before 0.61 which is our minimum version.

Dots were dropped from the end of some messages. Most messages did not have the
trailing dot.

0.63 added support for multi-line f-strings. We can't use those yet.
2025-10-03 21:21:52 +02:00
David Tardon
188049d38c tree-wide: combine DUMP_STRING_TABLE() and return 2025-10-02 16:19:03 +02:00
David Tardon
365399c4e4 nspawn: inline handle_arg_console() to its only call place 2025-10-02 16:19:03 +02:00
David Tardon
65c4347d6e nspawn: set arguments directly
There's no point in going through handle_arg_console() now that all the
checks have been moved out of it.
2025-10-02 16:19:03 +02:00
David Tardon
99df84ef23 nspawn: postpone selection of console mode
Moving it away from argument parsing code allows to simplify that.
2025-10-02 16:19:03 +02:00
David Tardon
25f1473c81 nspawn: use table to parse --console= 2025-10-02 16:18:41 +02:00
David Tardon
1da7dcf427 main: extract common code to a function 2025-10-02 16:13:40 +02:00
David Tardon
f29f6b6b7d userdbctl: use table to parse --output= 2025-10-02 16:13:40 +02:00