1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-22 13:33:56 +03:00
Commit Graph

7161 Commits

Author SHA1 Message Date
Lennart Poettering
2d495affef pcrphase: gracefully exit if TPM2 support is incomplete
If everything points to the fact that TPM2 should work, but then the
driver fails to initialize we should handle this gracefully and not
cause failing services all over the place.

Fixes: #25700
(cherry picked from commit 0318d54539)
2023-02-10 20:28:11 +00:00
Yu Watanabe
eea08d150c sleep: introduce SuspendEstimationSec=
Before v252, HibernateDelaySec= specifies the maximum timespan that the
system in suspend state, and the system hibernate after the timespan.

However, after 96d662fa4c, the setting is
repurposed as the default interval to measure battery charge level and
estimate the battery discharging late. And if the system has enough
battery capacity, then the system will stay in suspend state and not
hibernate even if the time passed. See issue #25269.

To keep the backward compatibility, let's introduce another setting
SuspendEstimationSec= for controlling the interval to measure
battery charge level, and make HibernateDelaySec= work as of v251.

This also drops implementation details from the man page.

Fixes #25269.

(cherry picked from commit 4f58b656d9)
2023-02-10 17:00:49 +01:00
David Tardon
25e30725d7 mount: handle bind mount of file with non-existing target
When the target (Where=) of a mount does not exist, systemd tries to
create it. But previously, it'd always been created as a directory. That
doesn't work if one wants to bind-mount a file to a target that doesn't
exist.

Fixes: #17184
(cherry picked from commit 218cfe2335)
2023-01-26 09:12:21 +01:00
Zbigniew Jędrzejewski-Szmek
5183d46ba1 core,man: add missing integration of OOMPolicy= in scopes
Fixup for 5fa098357e.

(cherry picked from commit d5a1657d5a)
2023-01-23 11:51:12 +01:00
Mark Laws
d539e18777 systemd: Support OOMPolicy in scope units
Closes #25376.

(cherry picked from commit 5fa098357e)
2023-01-23 11:51:12 +01:00
Yu Watanabe
1c8abb343a man: mention that DefaultRouteOnDevice= create the IPv4 default route
And add an example setting for creating an IPv6 default route.

Closes #25440.

(cherry picked from commit 15f330cf87)
2022-12-08 23:00:35 +01:00
Neil Moore
0ba8e9ecff virt: Support detection of LMHS SRE guests
(cherry picked from commit d833ed781f)
2022-12-08 21:29:56 +01:00
Zbigniew Jędrzejewski-Szmek
dbed9051f7 man: add note that network-generator is not a generator
Also fix indentation.

(cherry picked from commit 2fa6574e83)
2022-11-08 14:59:01 +01:00
Daan De Meyer
1757446e8b condition: Check that subsystem is enabled in ConditionSecurity=tpm2
Instead of succeeding when either the firmware reports a TPM device
or we find a TPM device, let's check that the firmware reports a TPM
device and the TPM subsystem is enabled in the kernel.

To check whether the subsystem enabled, we check if the relevant
subdirectory in /sys exists at all.

(cherry picked from commit 300bba79c2)
2022-11-07 13:16:26 +00:00
Frantisek Sumsal
35e19c1a50 man: use the correct 'Markers' property name for marking units
Follow-up to c9615f7352 and 70666e28a1.

(cherry picked from commit 1ca1bb03de)
2022-11-04 23:31:28 +00:00
Luca Boccassi
8aaa4e05a3 man: fix typo found by Lintian
(cherry picked from commit 84033dd405)
2022-11-04 23:31:28 +00:00
Lennart Poettering
5bdf35c14e man: make clear NNP has no effect on processes invoked through systemd-run/at/crontab and such things 2022-10-31 12:53:52 +01:00
Jan Janssen
6e50cf38a6 NEWS: Clarify overlapping UKI PE section offsets 2022-10-31 11:08:13 +01:00
Steve Ramage
1d87f03a6e
man: Add documentation for AssertCredential= (#25178)
Fixes #25177.

Co-authored-by: Steve Ramage <gitcommits@sjrx.net>
2022-10-30 06:07:21 +09:00
Nick Rosbrook
6dfaeac370 man: document reboot --poweroff exception
When reboot is invoked, the -p/--poweroff option is intentionally
ignored. Update the man page to reflect this exception.
2022-10-29 06:39:32 +09:00
Yu Watanabe
7db98bc938 network: make RouteTable= also accept route table name 2022-10-28 11:35:17 +09:00
Zbigniew Jędrzejewski-Szmek
7155a51e64
Merge pull request #25146 from keszybz/relicese-to-mit-0
Change license of code examples in docs to MIT-0
2022-10-27 07:31:56 +02:00
Zbigniew Jędrzejewski-Szmek
1fe6d37ea5 man: change license of examples to MIT-0
Quoting Richard Fontana in [1]:

  CC0 has been listed by Fedora as a 'good' license for code and content
  (corresponding to allowed and allowed-content under the new system). We plan
  to classify CC0 as allowed-content only, so that CC0 would no longer be
  allowed for code.

  Over a long period of time a consensus has been building in FOSS that
  licenses that preclude any form of patent licensing or patent forbearance
  cannot be considered FOSS. CC0 has a clause that says: "No trademark or
  patent rights held by Affirmer are waived, abandoned, surrendered, licensed
  or otherwise affected by this document." (The trademark side of that clause
  is nonproblematic from a FOSS licensing norms standpoint.) The regular
  Creative Commons licenses have similar clauses.

For the case of our documentation snippets, patent issues do not matter much.
But it is always nicer to have a license that is considerred acceptable without
any further considerations. So let's change the license to the (now recommended
replacement) MIT-0.

[1] https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/NO7KGDNL5GX3KCB7T3XTGFA3QPSUJA6R/

Using 'git blame -b' and 'git log -p --follow', I identified the following
folks as having made non-trivial changes to those snippets:

  Lennart Poettering
  Tom Gundersen
  Luca Bocassi
  Zbigniew Jędrzejewski-Szmek
  Thomas Mühlbacher
  Daan De Meyer

I'll ask for confirmation in the pull request.
2022-10-26 08:39:34 +02:00
Lennart Poettering
2781f7b43b man: also use DDIs in systemd-dissect man page 2022-10-25 18:59:10 +02:00
Daan De Meyer
bb6a971cca man: Mention that journal file size is capped to 4G in compact mode 2022-10-25 21:23:01 +09:00
Yu Watanabe
8207ec4b49
Merge pull request #25080 from keszybz/search-paths
Refusing linking files underneath our hierarchy, improve error messages
2022-10-25 01:57:41 +09:00
Zbigniew Jędrzejewski-Szmek
32d2e70ae4 man: fix count mismatch
We said "search path" and "search paths" in the same sentence…
2022-10-24 12:54:03 +02:00
Luca Boccassi
701f7f6c8f
Merge pull request #25077 from keszybz/completions-optional-components
Fix completions when machinectl is not installed and other fixes
2022-10-20 15:57:46 +02:00
Leon M. George
3d218676fc man: document effect of --user on --unit with journalctl
Relates to #25061.
2022-10-20 10:28:52 +02:00
Zbigniew Jędrzejewski-Szmek
99b8149ae1 machinectl: allow --max-addresses=0
Sometimes the addresses are not important, so allow skipping them in output.
2022-10-20 09:57:42 +02:00
Lennart Poettering
8f598a4635 man: document restrictions on naming interfaces
Let's document that "." is a bad choice of character when naming
interfaces. Let's also document the hard restrictions we make when
naming interfaces.

Result of the mess that is #25052.
2022-10-19 13:04:56 +02:00
Zbigniew Jędrzejewski-Szmek
9e11abe817
Merge pull request #25007 from keszybz/rename-dbus-dump
manager: rename dbus method
2022-10-18 11:34:16 +02:00
Luca Boccassi
6a0907b8a3
Merge pull request #25035 from keszybz/manager-method-names
Manager method names
2022-10-17 23:11:13 +02:00
Lennart Poettering
15f9a1525f man: add missing reference to systemd-pcrphase-sysinit.service 2022-10-17 17:12:45 +02:00
Luca Boccassi
7a329f2bac
Merge pull request #25036 from keszybz/plurals
Remove usage of "noun(s)" in messages and docs
2022-10-17 17:12:16 +02:00
Zbigniew Jędrzejewski-Szmek
0923b4253c tree-wide: replace "plural(s)" by "plurals"
(s) is just ugly with a vibe of DOS. In most cases just using the normal plural
form is more natural and gramatically correct.

There are some log_debug() statements left, and texts in foreign licenses or
headers. Those are not touched on purpose.
2022-10-17 15:10:53 +02:00
Zbigniew Jędrzejewski-Szmek
f6cce15bb3 manager: add DumpUnitsMatchingPatternsByFileDescriptor() 2022-10-17 15:00:53 +02:00
Zbigniew Jędrzejewski-Szmek
e2d4456f43 man: fix method name 2022-10-17 13:50:17 +02:00
Zbigniew Jędrzejewski-Szmek
70427ec553
Merge pull request #24986 from keszybz/news-systemd-measure
NEWS: rework the description of systemd-measure a bit again
2022-10-17 13:24:07 +02:00
Lennart Poettering
047273e6e8 pcrphase: add two additional phases
This adds two more phases to the PCR boot phase logic: "sysinit" +
"final".

The "sysinit" one is placed between sysinit.target and basic.target.
It's good to have a milestone in this place, since this is after all
file systems/LUKS volumes are in place (which sooner or later should
result in measurements of their own) and before services are started
(where we should be able to rely on them to be complete).

This is particularly useful to make certain secrets available for
mounting secondary file systems, but making them unavailable later.

This breaks API in a way (as measurements during runtime will change),
but given that the pcrphase stuff wasn't realeased yet should be OK.
2022-10-17 12:09:43 +02:00
Lennart Poettering
346a4e3db8 man: mention that pcrphase also measures into PCR 11 2022-10-17 08:02:53 +02:00
Pyfisch
b45b4f5008 Update list of partition type identifiers
Include verity sig partition identifiers.
List all supported CPU architectures.
2022-10-14 22:29:43 +02:00
Pyfisch
ba4a5eff6e Document two systemd-repart options in man page
Note --private-key and --certificate options for configuring
verity signature partitions in the listing of options.

Adjust one error message referring to the --certificate option.
2022-10-14 22:00:43 +02:00
Zbigniew Jędrzejewski-Szmek
293b9aa3eb manager: rename dbus method
Fixes #24989.
2022-10-14 18:31:33 +02:00
Zbigniew Jędrzejewski-Szmek
1485925d2d man: reword some awkward sentences 2022-10-14 15:56:58 +02:00
Franck Bui
d1d8786c5b analyze: extend the dump command to accept patterns
The new function DumpPatterns() can be used to limit (drastically) the size of
the data returned by PID1. Hence the optimization of serializing data into a
file descriptor should be less relevant than having the possibility to limit
the data when communicating with the service manager remotely.

NB: when passing patterns, the dump command omits the version of the manager as
well as the features and the timestamps.
2022-10-13 07:47:42 +09:00
Luca Boccassi
06768b90a3 portable: allow caller to override extension-release name check
When the --force flag is used, do not insist that the extension-release
file has to match the extension image name
2022-10-12 09:57:24 +01:00
Luca Boccassi
aad813bf17 portable: rename flag PORTABLE_FORCE -> PORTABLE_FORCE_ATTACH
The name is used only internally, also it was just added.
Allows adding different types of force flags.
2022-10-12 09:57:24 +01:00
Luca Boccassi
da60182759
Merge pull request #24933 from keszybz/erradicate-strerror
Erradicate strerror
2022-10-11 21:47:38 +02:00
Zbigniew Jędrzejewski-Szmek
b413d4fd3e man: use man7.org for strerror_r 2022-10-11 16:59:00 +02:00
Zbigniew Jędrzejewski-Szmek
2fd922afed man: recommend strerror_r() over strerror()
Let's nudge people towards the use of an anonymous buffer like we
do internally.

"errno" → "errnum", to match the man page for strerror, and also to avoid
confusion with the global variable. In general, I think that errno is a
terrible interface and we shouldn't encourage people to use it. Those functions
use errno-style error numbers, which are a different thing.
2022-10-11 16:59:00 +02:00
Zbigniew Jędrzejewski-Szmek
b4096cecff man: recommend %m over strerror()
The need to set errno is very very ugly, but at least it is thread-safe and
works correctly. Using strerror() is likely to be wrong, so let's not recommend
that. People who do a lot of logging would provide use some wrapper that sets
errno like we do, so nudge people towards %m.

I tested that all the separate .c files compile cleanly.
2022-10-11 16:59:00 +02:00
Zbigniew Jędrzejewski-Szmek
29c45dc434 man: use external .c files for three examples
This way it's much easier to test that the code compiles without issues.
It's also easier to edit the code.

Indentation in one of the examples is reduced to two spaces. This is what we
use in man pages to make them fit on screen better.
2022-10-11 16:59:00 +02:00
Daan De Meyer
32b61b0559
Merge pull request #24595 from rphibel/support-image-option-in-systemctl-and-coredumpctl
systemctl/coredumpctl: add support for --root and --image options
2022-10-10 11:35:20 +02:00
Zbigniew Jędrzejewski-Szmek
01f516314f man: use a list for description of ConditionFirmware=
Also reduce confusion of <replaceable> and <literal> and reword things for
legibility a bit.
2022-10-09 17:28:53 +02:00