Commit Graph

56490 Commits

Author SHA1 Message Date
Mike Yuan
a5592a2e00 mute-console: honor Context rather than arg_* 2025-10-07 13:38:21 +02:00
Mike Yuan
5f7e04dd35 mute-console: fix typo 2025-10-07 13:38:21 +02: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
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
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
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
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
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
Yu Watanabe
5fc94cc6d9 Use string tables to parse option arguments (#39173) 2025-10-04 23:16:12 +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
David Tardon
a5fada5d5d userdbctl: require value for --output=
Currently, when --output= is used with empty string, it resets the mode.
E.g.,

 # userdbctl user --output=json --output= ...

will use the default output mode, not JSON. But that functionality is
not documented and it seems to be of little practical use. Let's just
drop it.
2025-10-02 16:13:40 +02:00
David Tardon
292928e964 vpick-tool: use table to parse --print= 2025-10-02 16:13:40 +02:00
David Tardon
9033f923f9 homectl: use table to parse --export-format= 2025-10-02 16:13:40 +02:00
David Tardon
9b3041d9fe cgtop: rename enum value to match its string repr. 2025-10-02 16:13:20 +02:00
n0099
613f7f26aa nspawn: correct the option name --private-users-ownership= when it's not expected value 2025-10-02 16:06:55 +02:00
David Tardon
048d813fcd cgtop: use table to parse --cpu= 2025-10-01 16:16:58 +02:00
David Tardon
3a21f6aa6e cgtop: use table to parse --order= 2025-10-01 16:16:47 +02:00
Mike Yuan
817929a14e Several more timezone related cleanups (#39160)
Continuation of #38876.
2025-09-30 15:40:40 +02:00
Felix Pehla
0b89d8cfec shared/bootspec: update valid loader.conf options 2025-09-29 23:46:59 +02:00
Felix Pehla
aaa3e6880d shared/bootspec: parse loader.conf options added in v258 2025-09-29 23:14:11 +02:00
Felix Pehla
5fb90fa319 shared/bootspec: parse 'profile' boot entry option
Commit 1e9c9773b9 makes sd-boot recognize
a 'profile' option in a boot loader entry but bootctl and other
components parsing said config do not know about it.

This commit makes the option get parsed correctly and displays it too.
2025-09-29 23:01:12 +02:00
Felix Pehla
4a94a1b83f shared/bootspec: parse 'uki' boot entry option
Commit e2a3d56218 (as part of #36314)
makes sd-boot recognize a 'uki' stanza in a boot loader entry and
uapi-group/specifications@3f2bd8236d adds
it to the BLS, but bootctl and other components parsing said config do
not know about it, leading to the error message
`Unknown line 'uki', ignoring.` when attempting to parse the same entry.

This commit makes it get parsed the same way that that 'efi' is.
2025-09-29 22:59:49 +02:00
David Tardon
854789543b export: use table to parse --format= 2025-09-29 16:04:12 +02:00
Lennart Poettering
0c3639d0f5 homectl firstboot tweaks (#39137)
This adds what #39101 and #39070 did for the regular firstboot wizard
but for the homectl firstboot part: i.e. port to the generic prompt
loop, show the "chrome" bars, and mute the console.

And then it also makes querying for aux groups and shells optional,
because quite frankly, i am not sure what to answer there.
2025-09-29 10:56:27 +02:00
Luca Boccassi
054e542c54 vmspawn: enable qemu guest agent with --console=gui
For auto resolution scaling, etc
2025-09-29 10:53:14 +02:00
Yu Watanabe
8431368668 tree-wide: stop assigning colon prefixed timezone to $TZ
glibc (and also musl, though we do not officially support it yet)
silently ignores colon prefix in $TZ. Let's always not prefix the
timezone.

tzset(3) states:
> A nonempty value of TZ can be one of two formats, either of which can
> be preceded by a colon which is ignored.

Addresses https://github.com/systemd/systemd/pull/38876#discussion_r2384347594.
2025-09-28 11:14:00 +09:00
Yu Watanabe
7d6f1d695c timedatectl,test: use SAVE_TIMEZONE at more places 2025-09-28 10:10:47 +09:00
Yu Watanabe
672924356f calendar-spec: use SAVE_TIMEZONE
Then, we can avoid heavy fork() operation.
2025-09-28 10:09:47 +09:00
Felix Pehla
39179ac5fe sd-boot: fix indentation of status output
64376936c7 missed some printf()s when
adjusting indentation.
2025-09-28 09:50:19 +09:00
Yu Watanabe
3e843e9513 time-util: fix using wrong timezone when parsing timestamp (#38876)
This mostly fixes issues workarounded several times, e.g. #28472 and
#35471.
2025-09-28 09:49:10 +09:00
Yu Watanabe
2e966a7c0a bash-completion: systemd-sysext/systemd-confext missing options (#38948) 2025-09-28 09:48:13 +09:00
Luca Boccassi
dbcbe4aa04 vmspawn: try to set up swtpm state for 4K RSA keys support
The next version of swtpm will support RSA4096, but it needs to be called
with a new parameter in order to do so. Try with it first, and if
execution fails, fallback to running without it.

This is especially needed for OBS builds, as the signing key is RSA4096
and cannot be changed by users, so the generated UKIs have RSA4096 signatures
for the pcrsig sections, and swtpm refuses them without the new support.
2025-09-28 00:25:03 +09:00
Mike Yuan
fb10ffc4f4 Various small cleanups (#39155) 2025-09-27 17:22:57 +02:00