Commit Graph

546 Commits

Author SHA1 Message Date
Lennart Poettering
205b70e328 analyze: add "identify-tpm2" command that shows TPM2 chip information 2026-03-04 08:28:29 +01:00
Zbigniew Jędrzejewski-Szmek
d90858544c systemctl: rename enqueue-marked-jobs to enqueue-marked
Closes #40883. As described in the issue, it's not "jobs" that are
marked, and also the name is unnecessarilly long.

I think we don't need any compatibility measures here. At least in the
rpm world, package upgrade scripts go through the helper which is part
of the package so the new systemctl and the new helper are upgraded
together.
2026-03-03 15:26:45 +01:00
Yu Watanabe
ab2bc40dcd bash-completion/systemctl: add enqueue-marked-jobs and deprecate --marked
Follow-up for #40810.
2026-02-24 17:53:53 +00:00
Luca Boccassi
5137d58c22 bash completion: add --user/--system to portablectl 2026-02-18 10:40:12 +00:00
Luca Boccassi
28846f4e62 bash completion: add missing machinectl parameters 2026-02-18 10:40:12 +00:00
Luca Boccassi
3f618b8851 bash completion: fix machinectl completion when mixing machines and files 2026-02-18 10:39:38 +00:00
Luca Boccassi
5b6516f81e bash completion: add --system/--user to machinectl 2026-02-18 10:39:38 +00:00
Lennart Poettering
607152c742 varlinkctl: add 'list-registry' command 2026-02-09 10:54:17 +01:00
Yu Watanabe
8d96a18d90 bash-completion/sysext: add missing candidates for --always-refresh
Follow-up for 23115eeaf1.
2026-02-07 12:51:17 +01:00
Yu Watanabe
b3d73bc68e bash-completion/vmspawn: add -x/--ephemeral
Follow-up for 6e67fc2938.
2026-02-04 11:22:27 +01:00
Kai Lueke
23115eeaf1 sysext: Skip refresh if no changes are found
When the extensions for the final system are already set up from the
initrd we should avoid disrupting the boot process with the remount
(which currently isn't atomic) and the daemon reload for
systemd-confext and systemd-sysext. Similarly, when sysupdate ran and
updated extensions it's best to avoid the remount and daemon reload if
no changes are found.
To do this, encode the current extension state in more detail than
before where only the names of the extensions where encoded in the
overlay mount. This can also be used to provide more details about the
extension origin in "systemd-sysext status (--json=)". During the
refresh add a check whether the old state matches the new state and in
this case skip the refresh unless the user provides a flag to always
refresh. Besides the extension name and the resolved path the best
method for identification is the verity hash but that is not available
for plain image files or directories. Therefore, also include data to
check for file/directory replacements. The creation/modification times
are not always real on reproducible images or extracted archive content.
The file handle together with the unique mount ID is the next best
identifier we can use when we have no verity hash. Fall back to an inode
when we get no handle. With the creation/modification time and the path
this should be good enough. Using a unique mount ID is important (with
a fallback to the regular non-unique mount ID) instead of st_dev because
st_dev gets reused too easily, e.g., by a loop device mount and the
mount ID helps to catch this. For the mount ID to be valid it has to be
resolved before we enter the new mount namespace. Thus, it gets provided
by the image dissect logic and handed over to the sysext subprocess
which runs in a new mount namespace.
Luckily, we can rule out online modification of directories or image
files because this is anyway not well supported with overlay mounts, so
we don't do a file checksum nor do we recurse into a directory to look
for the most recently touched files.  But, as said, with the
always-refresh flag one can force a reload.
2026-02-04 00:05:24 +01:00
Kai Lüke
16b3472b3f vmspawn: Add image format option to support qcow2
A QEMU qcow2 VM image can be internally sparse and compressed.
Support such images in vmspawn for both the main disk and any extra
disks.
2026-01-29 09:02:13 +09:00
Kai Lüke
2e14be9a84 bash-completion/vmspawn: insert missing space between options
Follow-up for 3b18a8795d.
2026-01-28 19:48:48 +09:00
Daan De Meyer
4e805ec152 vmspawn: Add --user/--system and support user session machined registration
The UX of registering with the user session machined
instance is much better as there won't be an authorization
prompt. To make that available for users, let's add --user
and --system switches for vmspawn. For backwards compat, we'll
still try to register with the system machined instance if the
user machined instance is not available.
2026-01-02 08:49:36 +09:00
Guiorgy
f5530c10b8 Support Bash completions for short option group in journalctl (#40214)
Currently, the Bash completions for journalctl tries to match the
previous word _**exactly**_, which leads to the following issue:
`journalctl -u dock` correctly auto completes to `journalctl -u
docker.service`, but `journalctl -eu` provides no completions at all,
which is a shame since I never use the `-u` option alone (almost always
`-eu` or `-efu`, I wish the `-e` option was the default but I digress).

The proposed solution is to assume words that start with only a single
dash and consist of only letters are short option groups and handle them
as if the previous word was the short option using the last character,
e.g. `-efu` -> `-u`.
2025-12-31 14:58:58 +00:00
Luca Boccassi
a2d53619c0 varlinkctl: add support for polkit interactive auth 2025-12-17 23:22:05 +00:00
Luca Boccassi
2abb433ca1 shell-completion: fix portablectl path completion with preceding params
The completion fails to complete to paths for verbs that need them when
a --param is the previous word, e.g.:

portablectl attach --runtime <tab>

fails to complete to paths
2025-12-09 14:39:07 +09:00
Yu Watanabe
d2b8e42742 meson: exit earlier from the subdirectory when bash/zshcompletiondir is 'no' 2025-11-20 14:50:30 +09:00
Yu Watanabe
c74dc8cf14 meson: sort shell completions 2025-11-20 14:48:33 +09:00
Luca Boccassi
f16518ce86 shell-completion: add bash script for varlinkctl 2025-11-20 14:34:40 +09:00
Simon Barth
a049825708 shell-completion: bash: Add systemd-analyze calendar options
Add completion for the systemd-analyze calendar options --iterations and
--base-time.
2025-11-18 23:05:02 +01:00
Simon Barth
62aba7c5cd shell-completion: bash: Add systemd-analyze filesystems 2025-11-17 23:40:58 +01:00
Yu Watanabe
d32ec01223 shell-completion: drop deprecated cgroup controller suggestion 2025-11-17 21:31:51 +09:00
Jelle van der Waa
49ff5ad6e6 shell-completion: bash: add systemd-analyze image-policy completion 2025-11-10 20:09:53 +01:00
Lennart Poettering
d73d369133 analyze: add new verb for determining NvPCR values 2025-11-02 21:14:35 +01:00
Daan De Meyer
5cabeed80b run0: Add --empower
--empower gives full privileges to a non-root user. Currently this
includes all capabilities but we leave the option open to add more
privileges via this option in the future.

Why is this useful? When running privileged development or debugging
commands from your home directory (think bpftrace, strace and such),
you want any files written by these tools to be owned by your current
user, and not by the root user. run0 --empower will allow you to run
all privileged operations (assuming the tools check for capabilities
and not UIDs), while any files written by the tools will still be owned
by the current user.
2025-10-30 15:28:36 +01:00
Daan De Meyer
b1856a6c4a analyze: Add shell completion for dlopen-metadata 2025-10-30 14:11:28 +00:00
Pascal Bachor
9b5f1a6112 bash-completion: update systemd-sysext, systemd-confext 2025-09-26 20:20:49 +02:00
Zbigniew Jędrzejewski-Szmek
86048cce95 journalctl: add -W as short for --no-hostname
--no-hostname is one of the switches I use very often. In particular,
when looking at CI logs, the hostname is almost never interesting.
-H is not yet used in journalctl, because journal operates locally, but
will want it if display of remote journals is implemented. Use -W.
2025-09-17 14:27:00 +02:00
Luca Boccassi
e3f4aa4a75 shell-completion: add missing arguments for journalctl 2025-09-14 09:42:36 +01:00
Antonio Alvarez Feijoo
559da4a509 bash-completion/bootctl: add missing options and verb 2025-09-08 12:37:26 +02:00
Yu Watanabe
5bb434e317 shell-completion: support -i option for journalctl
Follow-up for dde54b8a85.
2025-08-26 19:24:39 +01:00
Zbigniew Jędrzejewski-Szmek
9fa08842b7 shell-completion: drop deprecated systemd-efi-options from suggestions 2025-07-28 19:08:50 +01:00
Yu Watanabe
54820da421 bash-completion/analyze: show candidates for --debugger
This also adds missing completion for --debugger-arguments.

Follow-up for ad6e02e7b4.
2025-07-18 01:47:25 +09:00
ZIHCO
ad6e02e7b4 systemd-analyze: added the verb unit-gdb to spawn and attach gdb 2025-07-17 15:09:58 +01:00
Eisuke Kawashima
c2b0f637c2 fix(shell-completion): discard error messages 2025-07-14 20:24:26 +09:00
Eisuke Kawashima
86fff7fb38 fix(shell-completion): strictly parse env output
shell functions may be exported, when env prints their body in multiple
lines
2025-07-14 20:24:26 +09:00
Eisuke Kawashima
b371e7252c fix(SC2164): robust cd conditional 2025-07-14 20:24:26 +09:00
Eisuke Kawashima
01e769bc2e fix(SC2162): add -r to read 2025-07-14 20:24:26 +09:00
Eisuke Kawashima
cb2e0dc4f5 fix(shell-completion): correct conditional 2025-07-14 20:24:26 +09:00
Eisuke Kawashima
12e64a4848 style(shell-completion): remove unnecessary backslashes 2025-07-14 20:24:25 +09:00
Eisuke Kawashima
5300aa7a1d style(shell-completion): remove trailing semicolons 2025-07-14 20:24:25 +09:00
Eisuke Kawashima
56c093004c style(shell-completion): add missing semicolons 2025-07-14 20:24:25 +09:00
Eisuke Kawashima
dfe6b3fa38 style(shell-completion): expand hard tabs and fix indentation 2025-07-14 20:24:25 +09:00
Eisuke Kawashima
4571a1d77a shell-completion: update systemd-run 2025-07-11 19:04:44 +02:00
Zbigniew Jędrzejewski-Szmek
63770fa1d3 systemd-run: add --no-pager, use pager for --help 2025-07-11 19:01:42 +09:00
Li Tian
b6d4997683 Add --entry-type=type1|type2 option to kernel-install.
Both kernel-core and kernel-uki-virt call kernel-install upon removal. Need an additional argument to avoid complete removal for both traditional kernel and UKI.

Signed-off-by: Li Tian <litian@redhat.com>
2025-07-10 18:07:23 +02:00
ZIHCO
9a08000d18 systemd-analyze: added the verb unit-shell to spawn and attach shell 2025-07-04 16:09:07 +01:00
Zbigniew Jędrzejewski-Szmek
d971936bf4 shell-completions: add systemd-analyze transient-settings
The zsh completions only complete one type argument, even though multiple
args are allowed. But the same issue occurs with other completions, e.g.
for options. I don't know how to solve this.
2025-07-03 21:03:26 +02:00
Zbigniew Jędrzejewski-Szmek
7d247d3cb8 meson: drop explicit custom_target names
[1] says:
> Since 0.60.0 the name argument is optional and defaults to the basename of
> the first output
We specify >= 0.62 as the supported version, so drop the duplicate name in all cases
where it is the same as outputs[0], i.e. almost all cases.

[1] https://mesonbuild.com/Reference-manual_functions.html#custom_target
2025-06-28 17:14:50 +02:00