Commit Graph
7465 Commits
Author SHA1 Message Date
Mike Yuan 5171356eee core: always calculate the next restart interval
Follow-up for #26902 and #26971

Let's always calculate the next restart interval
since that's more useful.

For that, we add 1 to s->n_restarts unconditionally,
and change RestartUSecCurrent property to RestartUSecNext.
2023-03-31 01:22:58 +01:00
Luca Boccassi ce199d12e9 man: add example for sd_bus_call_method 2023-03-30 18:55:55 +01:00
Luca Boccassi d10a5f6c3d man: further shorten print-unit-path example 2023-03-30 18:29:49 +01:00
Lennart Poettering bba6046b24 man: link up new online coredump docs from man page 2023-03-31 01:15:24 +08:00
Daan De Meyer 65e179a1e7 tmpfiles: Try to take a BSD lock on files as well
Similar to what we do for directories, just before we remove a file,
let's try to take a BSD lock on it. If that fails, skip removing the
file.
2023-03-30 11:45:05 +02:00
Daan De Meyer 1b07fd3c22 Merge pull request #27041 from poettering/fdstore-dump
add ability to show contents of service fdstore + teach systemd-notify passing fds into the fdstore
2023-03-30 09:32:13 +02:00
Yu Watanabe 85db5602e0 man: drop trailing space and mention uki_generator at one more place
Follow-up for 600362aa11.
2023-03-30 09:20:56 +02:00
Lennart Poettering 6e4a324574 notify: add support for sending fds with notification messages
This exposes the fd passing we support via sd_pid_notify_with_fds() also
via the command line tool systemd-notify.
2023-03-29 19:09:10 +02:00
Lennart Poettering 5f43c97cd2 analyze: add new fdstore verb 2023-03-29 19:09:10 +02:00
Lennart Poettering 2ea24611b9 pid1: add DumpFileDescriptorStore() bus call that returns fdstore content info 2023-03-29 18:53:20 +02:00
Luca Boccassi a5979f0bd5 man: fix shellcheck warning for html.in
SC2015: Note that A && B || C is not if-then-else. C may run when A is true.
2023-03-29 02:08:18 +01:00
Lennart Poettering 75f7e5e547 man: correct/tweak text about unit name syntax
Unit names can be 255 characters long, not 256.

We first say "name prefix" and then continue with "unit prefix".
Confusing. Couldn't figure out which term is better hence settled on
"unit name prefix".
2023-03-28 23:07:11 +01:00
Luca Boccassi 38d1d10465 os-release: add 'SYSEXT_' fields for version/id
sysext DDI cannot carry an os-release file, but have to carry
an extension-release file. But so far, this was only used to
match the sysext DDI with the base DDI/rootdir. It is also
useful to describe the sysext DDI itself, just like we do in
os-release.

So document that the same fields used in os-release can also
be added to an extension-release, with the 'SYSEXT_' prefix,
and in that case they are understood to define the sysext DDI
itself, rather than for matching purposes.
2023-03-28 12:14:21 +01:00
Mike Yuan 57b33e0ce7 core/dbus-service: add RestartUSecCurrent property
This new property shows how much time we actually
waits before restarting.
2023-03-27 19:31:12 +08:00
Mike Yuan be1adc27fc core: add RestartSteps= and RestartSecMax= for exponentially increasing
interval between restarts

RestartSteps= accepts a positive integer as the number of steps
to take to increase the interval between auto-restarts from
RestartSec= to RestartSecMax=, or 0 to disable it.

Closes #6129
2023-03-27 19:31:12 +08:00
Gertalitec 600362aa11 Define $KERNEL_INSTALL_UKI_GENERATOR
Define $KERNEL_INSTALL_UKI_GENERATOR in case one wants it to be different from $KERNEL_INSTALL_INITRD_GENERATOR. This can be useful if one wants to use mkinitcpio / Dracut to generate the initrd, but without creating the UKI so this can be left for e.g. ukify or something else. Right now these initrd generators will read /etc/kernel/install.conf and generate the UKI
2023-03-26 16:54:16 +02:00
Yu Watanabe cccc14c5a8 Merge pull request #26973 from mrc0mmand/userdbctl-tests
test: add a couple of tests for userdbctl
2023-03-26 09:49:27 +09:00
Yu Watanabe 363ed18730 Merge pull request #26960 from poettering/syscall-catchup
syscall filter group updates
2023-03-25 13:39:27 +09:00
Zbigniew Jędrzejewski-Szmek 32e07cff96 Merge pull request #26920 from medhefgo/ukify
ukify: Use pefile to add sections to EFI stub
2023-03-24 17:00:31 +01:00
Frantisek Sumsal 8f572d0d82 man: s/io.systemd.Dropin/io.systemd.DropIn/ 2023-03-24 15:43:04 +01:00
Lennart Poettering f452e0461f man: update syscal filter group list 2023-03-24 14:52:34 +01:00
Zbigniew Jędrzejewski-Szmek 0da2780c8a Merge pull request #26785 from keszybz/udev-distcheck
Implement --help/--version in all udev builtins
2023-03-24 13:38:54 +01:00
Jan Janssen 3fc5eed470 ukify: Use pefile to add sections to EFI stub 2023-03-24 13:01:45 +01:00
Mike Yuan f1710073c7 Merge pull request #26214 from YHNdnzj/sd-notify-change-notifyaccess
core: support overriding NOTIFYACCESS= through sd-notify during runtime
2023-03-24 00:11:29 +08:00
Mike Yuan 19dff6914d core: support overriding NOTIFYACCESS= through sd-notify during runtime
Closes #25963
2023-03-22 06:33:12 +08:00
Daan De Meyer 4d62ee559d execute: Add kernel cmdline arguments for tty term, rows and columns
Let's allow configuring tty term and size using kernel cmdline arguments
so that when running in a VM we can communicate the terminal TERM and size
from the host via SMBIOS extra kernel cmdline arguments.
2023-03-21 20:50:17 +01:00
Antonio Alvarez Feijoo 9baeb58fcd man/network-generator: replace dracut.kernel reference with dracut.cmdline
`dracut.kernel.7` is just a symlink to `dracut.cmdline.7`, so the web reference
points to a non-existent URL
(https://man7.org/linux/man-pages/man7/dracut.kernel.7.html).
2023-03-21 19:00:00 +09:00
Yu Watanabe f5c0edd166 man: explicitly list three command syntax at the beginning 2023-03-18 20:22:08 +08:00
Mike Yuan f05b4bb9a7 sleep: fix default values unmatched with manual 2023-03-18 02:28:22 +08:00
Addison Snelling 0c868e3fad man: fix misspelled executable name (#26858) 2023-03-17 11:36:32 +09:00
Zbigniew Jędrzejewski-Szmek 5356761da6 udev: implement --version in all builtins
Those are separate binaries, and occasionally people will get a misplaced
binary that doesn't match the rest of the installed system and be confused, so
it good to be able to check the version. It is also nice to have the same
interface in all binaries.

Note that we usually use a separate 'enum ARG_VERSION = 0x100' for an option
without a short name. We can use a less verbose approach of simply taking any
unused letter, which works just as well and even the compiler would warn us
if we tried to use the letter in another place. This way we avoid a few lines
of boilerplate.

The help texts are adjusted to have an empty line between the synopsis and
option list, and no empty lines after the option list.
2023-03-16 16:46:44 +01:00
Mike Yuan 1ed35a0d93 machinectl: add verb edit and cat to operate on .nspawn files
This allows operating on .nspawn files using machinectl.

Closes #26246
2023-03-15 19:56:19 +08:00
Lennart Poettering 264c267686 Merge pull request #26794 from bluca/log_extra_fields
core: append LogExtraFields= values to log_unit* messages
2023-03-15 09:27:47 +01:00
Luca Boccassi 544471bf83 Merge pull request #26815 from keszybz/cgls-no-xattrs-by-default
Do not show xattrs and cgroup ids in cgls by default
2023-03-15 00:24:02 +00:00
Luca Boccassi a247e95c28 Merge pull request #26808 from keszybz/no-controllers-followup
Docs and dump output follow-up for the case of delegation with no controllers
2023-03-15 00:23:05 +00:00
Zbigniew Jędrzejewski-Szmek ec38ec55ee cgls: add -x and -c options
-x is short for --xattrs=yes and
-c is short for --cgroup-id=yes.
2023-03-14 18:03:32 +01:00
Zbigniew Jędrzejewski-Szmek 5346bb499f cgls: stop showing cgroup ids and xattrs by default
Those are rather specialized bits of information, useful mostly for debugging.
I use cgls quite often but never had the need to use either of those…
But they take up a significant amount of screen real estate, esp. when
executed as root:

-.slice
├─user.slice (#1683)
│ → user.invocation_id: 74b0bd1258c5485eb969016384e0d06a
│ → trusted.invocation_id: 74b0bd1258c5485eb969016384e0d06a
│ └─user-1000.slice (#6488)
│   → user.invocation_id: b0261a14fe74490d9a9d5266c52cceb6
│   → trusted.invocation_id: b0261a14fe74490d9a9d5266c52cceb6
│   ├─user@1000.service … (#6590)
│   │ → user.invocation_id: 9e1fb54ad07940d8b92c33c81d169f11
│   │ → user.delegate: 1
│   │ → trusted.invocation_id: 9e1fb54ad07940d8b92c33c81d169f11
│   │ → trusted.delegate: 1
│   │ ├─session.slice (#6874)
...

Let's not show them by default, so we can show more cgroups.

(Also, on a terminal, we already highlight delegate units via underlining and
an ellipsis, so 'user.delegate:1' is redundant.)
2023-03-14 18:02:42 +01:00
Luca Boccassi 1092e82bb7 core: append LogExtraFields= values to log_unit* messages
This ensure messages from PID1 regarding a unit also contain those
fields. For example, portable services have PORTABLE=<image> as
extra fields, which is useful to identify which version of a portable
image produced a log message like an error or an oomd kill.
2023-03-14 16:38:23 +00:00
Zbigniew Jędrzejewski-Szmek 449172f943 man: document "Delegate=" a bit more
This case is a bit surprising, even if logical if one understands how the
parser works. Let's be more explicit.

Follow-up for 7b3693e4e4.
2023-03-14 12:27:51 +01:00
Mike Yuan 1433e1f998 systemctl: add option --when for scheduled shutdown
Pass an empty string or "cancel" will cancel the action.
Pass "show" will show the scheduled actions.

Replaces #17258
2023-03-14 19:21:11 +08:00
Yu Watanabe a6ca54ed94 man: add missing tags in udevadm(8) 2023-03-13 19:29:58 +00:00
Topi Miettinen 7a114ed4b3 execute: use prctl(PR_SET_MDWE) for MemoryDenyWriteExecute=yes
On some ARM platforms, the dynamic linker could use PROT_BTI memory protection
flag with `mprotect(..., PROT_BTI | PROT_EXEC)` to enable additional memory
protection for executable pages. But `MemoryDenyWriteExecute=yes` blocks this
with seccomp filter denying all `mprotect(..., x | PROT_EXEC)`.

Newly preferred method is to use prctl(PR_SET_MDWE) on supported kernels. Then
in-kernel implementation can allow PROT_BTI as necessary, without weakening
MDWE. In-kernel version may also be extended to more sophisticated protections
in the future.
2023-03-13 18:44:36 +00:00
Daan De Meyer 80c7d4b8fa man: Fix user generator output paths
These are all under $XDG_RUNTIME_DIR/systemd instead of directly
under $XDG_RUNTIME_DIR.
2023-03-13 13:51:48 +00:00
Yu Watanabe c9501b03cd Merge pull request #26641 from medhefgo/boot-elf2efi
boot: Drop gnu-efi / Add elf2efi.py
2023-03-11 17:15:01 +09:00
Yu Watanabe 5b23987eaf Merge pull request #26739 from ldv-alt/udevadm-verify
udevadm verify: introduce --root option
2023-03-11 17:12:57 +09:00
Morten Linderud 9e60dc0daf man: Fix pcrphase.service manvolnum from 1 to 8 2023-03-10 20:29:56 +01:00
Dmitry V. Levin 0a7eda348c udevadm verify: introduce --root option
When udevadm verify is invoked without positional arguments and loads
all rules files from the system like the udev daemon does, this option
can be used to operate on files underneath the specified root path.
2023-03-10 17:10:41 +00:00
Dmitry V. Levin e8c53080c4 udevadm verify: load all rules from the system if no rules were given
When udevadm verify is invoked without positional arguments, that is,
when no udev rules files are specified, load all rules files from the system
like the udev daemon does, and verify them.
2023-03-10 17:10:41 +00:00
Jan Janssen dfca5587cf tree-wide: Drop gnu-efi
This drops all mentions of gnu-efi and its manual build machinery. A
future commit will bring bootloader builds back. A new bootloader meson
option is now used to control whether to build sd-boot and its userspace
tooling.
2023-03-10 11:41:03 +01:00
Lennart Poettering 862481ece0 Merge pull request #26693 from poettering/udev-loop-links
udev: add /dev/loop/by-inode/… + /dev/loop/by-ref/… loopback block device symlinks
2023-03-10 09:34:31 +01:00