1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-23 21:35:11 +03:00
Commit Graph

8980 Commits

Author SHA1 Message Date
David Joaquín Shourabi Porcel
a41da1e703
man: machinectl(1): Fix description of subcommand poweroff 2024-10-08 15:23:17 +02:00
David Joaquín Shourabi Porcel
f4e3c6e5b3
man: systemd-nspawn(1): Fix some typos 2024-10-08 15:23:07 +02:00
Ryan Wilson
3543456f84 Add ExtraFileDescriptor property to StartTransientUnit dbus API
This adds the ExtraFileDescriptor property to StartTransient dbus API
with format "a(hs)" - array of (file descriptor, name) pairs. The FD
will be passed to the unit via sd_notify like Socket and OpenFile.

systemctl show also shows ExtraFileDescriptorName for these transient
units. We only show the name passed to dbus as the FD numbers will
change once passed over the unix socket and are duplicated, so its
confusing to display the numbers.

We do not add this functionality for systemd-run or general systemd
service units as it is not useful for general systemd services.
Arguably, it could be useful for systemd-run in bash scripts but we
prefer to be cautious and not expose the API yet.

Fixes: #34396
2024-10-07 09:01:48 -07:00
Daan De Meyer
598bb6fde4
Merge pull request #34608 from DaanDeMeyer/ukify
ukify: Rework multi-profile UKIs
2024-10-04 13:57:16 +02:00
Jörg Behrmann
56f32d9e78 man: Use proper conjunction and remove superfluous or 2024-10-04 12:45:21 +01:00
Luca Boccassi
3509fe124d man: consolidate list of active unit states into a shared table
Avoids the need to maintain the same list over and over again, and
link it to the defition table in the implementation as a reminder
too
2024-10-04 12:22:55 +02:00
Daan De Meyer
16020c3324 ukify: Rework multi-profile UKIs
The API introduced in https://github.com/systemd/systemd/pull/34295
is less than ideal:

- It doesn't consider signing at all (ukify can't sign separately yet)
- Measurement is completely broken (all profile sections are marked to
  not be measured)
- It focuses on a very niche use case of extending existing UKIs and makes
  the more common use case of building a UKI with several profiles included
  much harder than needed.

Let's instead rework the API to focus on the primary use case of building
a UKI with multiple profiles added to it immediately. We require the profiles
to be built upfront as separate PE binaries with UKI. There's no need to sign
or measure these, they're solely vehicles for profile sections. This saves us
from having to complicate the command line and config parsing to support defining
multiple profiles.

To add the profiles when building a UKI, we introduce the new --add-profile
switch which takes a path to a PE binary describing a profile. The required
sections are read from each PE binary, measured and added as a profile.

The integration test is disabled until the new API is merged and exposed in
mkosi so that building a UKI with profiles can be left to mkosi and the integration
test will only test the switching between profiles and not the building of UKIs
with profiles.
2024-10-04 11:36:25 +02:00
Luca Boccassi
2f8ac1c4c7
Merge pull request #34610 from poettering/exec-start-single-line
Soft deprecate multiple ExecStart= command lines within a single assignment
2024-10-03 22:46:11 +01:00
Daan De Meyer
3891d57c4f Revert "ukify: add new --extend= switch for importing an existing UKI's sections to later extend"
This reverts commit b6570095ce.
2024-10-03 23:15:32 +02:00
Daan De Meyer
71f11a8f4c Revert "ukify: introduce new --measure-base= switch"
This reverts commit bc3e2c5a57.
2024-10-03 23:15:32 +02:00
Luca Boccassi
bdbec7cfe0
Merge pull request #34590 from poettering/file-hier-removals
man: remove some irrelevant dirs from file-hierarchy(7)
2024-10-03 21:04:30 +01:00
Zbigniew Jędrzejewski-Szmek
fb0ef5eac0 man/systemd-stub: reword descriptions of .dtb and .profile sections
- The text was clearly edited in variuos places to e.g. allow multiple
  sections, so it first said that sections are singletons, and immediately
  after that that some section are not.
- Replace "regardless of the kernel" with "regardless of the kernel version".
  The kernel is very much involved e.g. in loading of the initrds.
- Various other small rewordings to make the text more legible.
2024-10-03 16:34:04 +01:00
Lukas Nykryn
67b6404b80 man: using WantedBy=default.target is not a good idea
We had several users, that wrote their unit files with
WantedBy=default.target because it should be started "every time".
But for example in Fedora/CentOS/RHEL, this often breaks for
example selinux relabels (where we just want to do a relabel and reboot).
2024-10-02 18:25:03 +02:00
Lennart Poettering
f39e66b85a man: drop reference to /bin/ from docs regarding binary search path
We don't support "split /usr" systems anymore, hence no point in
mentioning /bin/ anymore as being part of the binary search path.
2024-10-02 10:57:25 +02:00
Lennart Poettering
225f18b9a9 man: soft deprecate use of ";" for separating multiple command lines in ExecStart=
So far we supported this syntax:

    ExecStart=foo ; bar

as equivalent to:

    ExecStart=foo
    ExecStart=bar

With this change we'll "soft" deprecate the first syntax. i.e. it's
still supported in code, but not documented anymore.

The concept was originally added to make things easier for 3rd party
.ini readers, as it allowed writing unit files with a .ini framework
that doesn't allow multiple assignments for the same key. But frankly,
this is kinda pointless, as so many other of our knobs require the
double assignment.

Hence, let's just stop advertising the concept, let's simplify the docs,
by removing one entirely redundant feature from it.

Replaces: #34570
2024-10-02 10:57:25 +02:00
Marcel Hellwig
fec09ff094 Update sd_bus_message_append_array.xml
fix pointer constness in documentation
2024-10-01 15:55:28 +02:00
Daniel Dawson
0c96911afb systemd-integritysetup: accept integrity-algorithm=xxhash64
Signed-off-by: Daniel Dawson <danielcdawson@gmail.com>
2024-10-01 11:16:14 +02:00
Mike Yuan
468c6265a2
Merge pull request #34534 from keszybz/man-exitrd
Formally document exitrds
2024-09-30 21:02:04 +02:00
Lennart Poettering
5b53894123 man: add a comment that inode type policy might be enforces via an LSM or similar
Just to tighten the language a bit, why people should care about where
they place their inodes.
2024-09-30 18:28:27 +02:00
Lennart Poettering
fd6e079e7b man: clarify that the defined file hiearchy is just a skeleton
(And specifically mention /usr/include + /var/spool as not covered here,
but being OK to add downstream)
2024-09-30 18:19:33 +02:00
Lennart Poettering
b0201b36d2 man: drop /var/spool/ mention from file-hierarchy(7) man page
Today it seems this is mostly used by mail and printer servers, and it's
not clear to me at all what the property is that makes
/var/spool/<package> the better place for the relevant data than
/var/lib/<package>.

Hence, in the interest of shortening the spec, let's not mention the dir
anymore. In particular as the dir really isn't used by us much, for
example we do not have a counterpart for RuntimeDirectory=,
StateDirectory=, … that would cover the spool.

Since most systems these days we care about probably come *without* a
printer or mail server, let's maybe no mention this in the man page that
is supposed to discuss the rough skeleton how things are set up. After
all, people are supposed to exend the skeleton with their stuff, and
this sounds more like a case for an extension of the skeleton instead of
being considered part of the skeleton itself.
2024-09-30 18:06:02 +02:00
Lennart Poettering
9e7b691073 man: drop mention of /usr/include/ from file-hierarchy(7) man page
The man page is supposed to provide a "generalized, though minimal and
modernized subset" (as per introductory pargapraghs), from a systemd
perspective. But the thing is that /usr/include/ really doesn't matter
to us. It's a development thing, and slightly weird (because it arguably
would be better places in /usr/share/include/ or so). It's not going to
be there on 95% of deployed systems, and we really don't want people to
bother with it on such systems.

We only define the skeleton of directories in this document, and it's
expected that people extend it, and I think this really should be one of
those dirs that is an extension of our skeleton, but not part of the
skeleton, if that makes any sense.
2024-09-30 18:01:12 +02:00
Yu Watanabe
82f2c33db5 tpm2-util: show loaded libraries in 'systemd-analyze has-tpm2'
After 3b16e9f419, even the libraries are
documented in the man page, it is useful to mention which libraries are
checked in the command output.

Of course, the dependencies are kind of implementation detail, and may
be changed in the future version, but that's especially why I think
showing the library deps in the output is useful.

systemd-analyze is a debugging tool, and already shows many internal
states. I think there is nothing to prevent from showing the deps.

Prompted by #34477.
2024-09-30 15:40:14 +02:00
Zbigniew Jędrzejewski-Szmek
1ca81b2e00 man: fix formatting in file-hierarchy
Somebody wrapped the text, but whitespace is preserved in <programlisting>, so
the output was mangled. It also doesn't make sense to run systemd-path as root
(as indicated by '#'), so drop that. Also, this chunk should be a separate
paragraph.
2024-09-26 19:57:07 +02:00
Zbigniew Jędrzejewski-Szmek
7352a0093f man: say that SYSEXT_SCOPE=initrd also applies to exitrds
We generally do _not_ want the same sysexts to be loaded in both initrd and
exitrd phases. The environment is completely different and it's unlikely that
the same code can be useful in both places. Nevertheless, it can be useful in
_some_ cases, for example when the sysexts contains debugging tools.

I think we don't need to differentiate between initrds and exitrds through
SYSEXT_SCOPE, because the two types are made available in completely different
locations and loaded through a different mechanism, with very little chance of
an initrd being loaded as an exitrd without an explicit admin action (or the
other way around). So let's not complicate our code or definitions by an
explicit "exitrd" sysext designator, but just clarify that "initrd" also
encompasses exitrds in this context.
2024-09-23 12:12:06 +02:00
Zbigniew Jędrzejewski-Szmek
c87bce7d28 man: reword some sentences with umbiguous subjects
A sencence like "The system manager does, a, b, c, which is really d, and e.",
it is generally understood that the manager also does "e". This can be
quite confusing if the manager cannot do "e", in our case unmount the file
system on which it is sitting.

Similary, we cannot "fall back to x if it is missing", since "it" in that
sentence means "x".
2024-09-23 12:09:43 +02:00
Zbigniew Jędrzejewski-Szmek
ace26a511f man: slightly enhance docs about "exitrd" and remove TODO entry for it
The concept is fairly well established and present in our docs in various
places.

Say that the exitrd is also marked by the presence of /etc/initrd-release.
2024-09-23 12:09:43 +02:00
Yu Watanabe
3ae0e54527 machine: fix bus method argument name: who -> whom
Follow-up for cd2fb04960.
2024-09-21 05:38:01 +09:00
cvlc12
dbf5b09de4 man: update PCR and Secure Boot key names and paths 2024-09-20 05:01:15 +09:00
Yu Watanabe
3b16e9f419 man/systemd-analyze: mention required libraries for TPM2 support
Closes #34477.
2024-09-19 19:21:08 +09:00
Yu Watanabe
07e6a111c0 man: fix typo
Follow-up for 8aee931e7a.
2024-09-19 09:18:47 +09:00
Antonio Alvarez Feijoo
bf39626d61 man/repart: use <varname> instead of <variable>
Otherwise, `<variable>$BOOT</variable>` is rendered:

```
[2548/2992] Generating man/repart.d.5 with a custom command
Element variable in namespace '' encountered in para, but no template matches.
Element variable in namespace '' encountered in para, but no template matches.
```
2024-09-18 16:03:56 +02:00
Daan De Meyer
81af8f998e repart: Support specifying multiple directories to ExcludeFiles= 2024-09-18 10:22:33 +02:00
Jason Yundt
dfb3155419 man: document ShowStatus and SetShowStatus()
SetShowStatus() was added in order to fix #11447. Recently, I ran into
the exact same problem that OP was experiencing in #11447. I wasn’t able
to figure out how to deal with the problem until I found #11447, and it
took me a while to find #11447.

This commit takes what I learned from reading #11447 and adds it to the
documentation. Hopefully, this will make it easier for other people who
run into the same problem in the future.
2024-09-18 10:11:55 +02:00
Adrian Vovk
2cb9c68c3a
repart: Add SupplementFor= logic
This was designed to deal with $BOOT, as defined by the Boot Loader
Specification, but it was made a generic mechanism because it is useful
elsewhere too. See the updated man page for usage examples, motivation,
and an explanation of how this works.
2024-09-17 14:06:50 -04:00
Yu Watanabe
4f0bc2582e man: fix typo
Follow-up for a632d8dd9f.
2024-09-16 11:49:04 +09:00
Yu Watanabe
f6cc5e1c8d
Merge pull request #34393 from poettering/tmpfiles-ownership-flag
tmpfiles: introduce an explicit line flag $ for enabling purge logic …
2024-09-16 10:51:09 +09:00
Yu Watanabe
590f430cac
Merge pull request #34425 from yuwata/udev-rules-case-insensitive-match
udev-rules: support case insensitive match
2024-09-16 10:42:37 +09:00
Yu Watanabe
b5ec8f77e0
Merge pull request #34434 from poettering/bootctl-stub-paths
bootctl: expose new stub path efi vars and related
2024-09-16 10:41:24 +09:00
Lennart Poettering
3e0a3a0259 bootctl: show whether a PE file is an addon in 'booctl kernel-identify' 2024-09-16 10:41:10 +09:00
Lennart Poettering
db15657dfb tmpfiles: introduce an explicit line flag $ for enabling purge logic for a line
Let's make the risk of accidental misuse, and mark lines that shall be
covered by --purge with an explicit new flag "$".

See: #33349
2024-09-15 19:43:09 +02:00
Lennart Poettering
90cf998875 bootctl: add --print-loader-path + --print-stub-path
These are inspired by the existing commands that return the path to the
boot or ESP partitions. However, these new commands show the path to the
boot loader (systemd-boot) or UKI/stub (systemd-stub) that was used on
the current boot. This information is derived from EFI variables.
2024-09-15 19:34:19 +02:00
Mike Yuan
3a41a21666 man/bootup: rename initrd to exitrd at one more place
Follow-up for f2c2fa87b6
2024-09-16 01:35:31 +09:00
Yu Watanabe
5f5c5c48b9 udev-rules: support case insensitive match
This introduces 'i' prefix for match string. When specified, string or
pattern will match case-insensitively.

Closes #34359.

Co-authored-by: Ryan Wilson <ryantimwilson@meta.com>
2024-09-15 23:09:26 +09:00
Lennart Poettering
55184c4cfc man: document that sd_bus_process() only returns otherwise unhandled messages in *ret_message 2024-09-12 16:18:07 +02:00
Lennart Poettering
1791854ce4
Merge pull request #34385 from poettering/man-unify-pcr-key-name
man: clean up PCR public key filenames in systemd-stub and systemd-measure man pages
2024-09-12 15:45:40 +02:00
Lennart Poettering
58e359604f analyze: move "has-tpm2" from systemd-creds to systemd-analyze
The verb s not really specific to credential management, it was always a
bit misplaced. Hence move it to systemd-analyze, where we already have
some general TPM related verbs such as "srk" and "pcrs"
2024-09-12 12:56:03 +02:00
Lennart Poettering
201aca5f9a man: fix advertised filename of the PCR public key 2024-09-12 09:46:26 +02:00
Lennart Poettering
6f1dfc407e man: systemd-stub places PCR public key in file 'tpm2-pcr-public-key.pem', stick to that name across the board
systemd-stub provides the signing key for TPM2 signed PCR policies in a
file tpm2-pcr-public-key.pem to userspace. Hence, to clarify that this
is the same key as used when signing via "systemd-measure", let's rename
it in the docs like that.

Also rename the private key to tpm2-pcr-private-key.pem, to keep the
symmetry.

With this we should universally stick to this nomenclature:

1. tpm2-pcr-public-key.pem   ← public part of signing key
2. tpm2-pcr-private-key.pem  ← private part of signing key
3. tpm2-pcr-signature.json   ← signature file made with key pair

Inspired by: #34069
2024-09-12 09:46:26 +02:00
Daan De Meyer
aaa6c6e279
Merge pull request #34377 from DaanDeMeyer/symlinks
repart: Add MakeSymlinks=
2024-09-11 21:34:37 +02:00