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

56 Commits

Author SHA1 Message Date
Yu Watanabe
4ebbb5bfe8 man: asorted fixes
Closes #35307.
2024-11-24 01:11:42 +09:00
Štěpán Němec
597c6cc119 man: fix incorrect volume numbers in internal man page references
Some ambiguity (e.g., same-named man pages in multiple volumes)
makes it impossible to fully automate this, but the following
Python snippet (run inside the man/ directory of the systemd repo)
helped to generate the sed command lines (which were subsequently
manually reviewed, run and the false positives reverted):

from pathlib import Path

import lxml
from lxml import etree as ET

man2vol: dict[str, str] = {}
man2citerefs: dict[str, list] = {}

for file in Path(".").glob("*.xml"):
    tree = ET.parse(file, lxml.etree.XMLParser(recover=True))
    meta = tree.find("refmeta")
    if meta is not None:
        title = meta.findtext("refentrytitle")
        if title is not None:
            vol = meta.findtext("manvolnum")
            if vol is not None:
                man2vol[title] = vol
            citerefs = list(tree.iter("citerefentry"))
            if citerefs:
                man2citerefs[title] = citerefs

for man, refs in man2citerefs.items():
    for ref in refs:
        title = ref.findtext("refentrytitle")
        if title is not None:
            has = ref.findtext("manvolnum")
            try:
                should_have = man2vol[title]
            except KeyError:  # Non-systemd man page reference?  Ignore.
                continue
            if has != should_have:
                print(
                    f"sed -i '\\|<citerefentry><refentrytitle>{title}"
                    f"</refentrytitle><manvolnum>{has}</manvolnum>"
                    f"</citerefentry>|s|<manvolnum>{has}</manvolnum>|"
                    f"<manvolnum>{should_have}</manvolnum>|' {man}.xml"
                )
2024-11-11 20:31:08 +01:00
Daan De Meyer
a1d46e3078 tree-wide: Introduce --certificate-source= option
This allows loading the X.509 certificate from an OpenSSL provider
instead of a file system path. This allows loading certficates directly
from hardware tokens instead of having to export them to a file on
disk first.
2024-11-07 20:30:47 +01:00
Zbigniew Jędrzejewski-Szmek
d202ea5754 man/systemd-repart: extend description and reword some sentences
The page was written when systemd-repart was primarily intended to be used on a
running system. But nowadays it's more often used to create images, so extend
that part of the description.

While at it, fix some whitespace issues and trim some overly complicated sentences.
2024-07-22 12:14:23 +01:00
Lennart Poettering
3a37a13a02 repart: add --list-devices switch for listing candidate block devices 2024-07-01 16:39:40 +02:00
Sam Leonard
9bfabe14e5 man: fix incorrect XML in man page 2024-04-15 10:40:11 +02:00
cunshunxia
cc59d1014f man: fix a few issues in manpage
fix: #31482

Signed-off-by: cunshunxia <cunshunxia@tencent.com>
2024-03-20 15:24:11 +01:00
Luca Boccassi
a73144bbdf repart: add --private-key-source and drop --private-key-uri
It turns out it's mostly PKCS11 that supports the URI format,
and other engines just take files. For example the tpm2-tss-openssl
engine just takes a sealed private key file path as the key input,
and the engine needs to be specified separately.

Add --private-key-source=file|engine:foo|provider:bar to
manually specify how to use the private key parameter.

Follow-up for 0a8264080a
2024-03-01 17:32:19 +00:00
Daan De Meyer
1a0541d44c repart: Add --generate-fstab= and --generate-crypttab= options
These can be used along with two new settings MountPoint= and
EncryptedVolume= to write fstab and crypttab entries to the given
paths respectively in the root directory that repart is operating on.

This is useful to cover scenarios that aren't covered by the
Discoverable Partitions Spec. For example when one wants to mount
/home as a separate btrfs subvolume. Because multiple btrfs subvolumes
can be mounted from the same partition, we allow specifying MountPoint=
multiple times to add multiple entries for the same partition.
2024-02-10 13:07:02 +01:00
Luca Boccassi
0a8264080a repart: support OpenSSL engines/providers for signing
The provider API which is new requires providers, which are not
widely available and don't work very well yet, so also use a
fallback with the legacy engine API.
2024-02-09 15:11:25 +00:00
David Tardon
932abebf4d man: fix markup
<arg> is not allowed inside <term>.
2023-12-26 13:10:35 +01:00
David Tardon
eea10b26f7 man: use same version in public and system ident. 2023-12-25 15:51:47 +01:00
David Tardon
13a69c120b man: use <simplelist> for 'See also' sections
This is just a slight markup improvement; there should be no difference
in rendering.
2023-12-23 08:28:57 +01:00
Lennart Poettering
78fdf0f68b repart: add --tpm2-device-key= to repart, too
This adds what was added to systemd-cryptenroll recently to
systemd-repart too.

Follow-up for: c3a2a681be
2023-11-09 12:27:43 +01:00
Lennart Poettering
e206210909 man: document pcrlock 2023-11-03 11:24:58 +01:00
Yu Watanabe
4f4d7911cd man: fix typo
Follow-up for a121b331e3.
2023-10-06 11:18:47 +09:00
Lennart Poettering
a121b331e3 repart: make it easy to generate DDIs
This adds --make-ddi=confext, --make-ddi=sysext, --make-ddi=portable, to
make it really easiy to generate DDIs of the specified class. It
it's ultimately just a fancy wrapper around some defaults and in
particular --definitions=.

This makes it very easy to generate a confext:

 $ systemd-repart -C --private-key=privkey.pem --certificate=cert.crt -s mytree/ mytree.confext.raw
2023-10-05 19:08:11 +02:00
Lennart Poettering
607343a1ac repart: add new --copy-source= switch
This specifies a directory to which CopyFiles= is considered relative.
If unset defaults to the --root=/--image= setting, or host / otherwise.

This is very similar to --root= but is much more focussed: it is really
and exclusively about CopyFiles= (and related settings such as
ExcludeFiles=) and does not affect any of the settings, i.e. it doesn't
affect CopyBlocks=, the machine ID/seed handling, or where definitions
are read from.

In fact, --root= and --copy-source= may be combined for example to
use the machine ID and similar from one tree, but the copy the files
from another.
2023-10-05 19:07:19 +02:00
Abderrahim Kitouni
ec07c3c80b man: add version info
This tries to add information about when each option was added. It goes
back to version 183.

The version info is included from a separate file to allow generating it,
which would allow more control on the formatting of the final output.
2023-08-29 14:07:24 +01:00
Luca Boccassi
e17076b9f0 man: systemd-repart can now create filesystems, update manpage 2023-08-12 00:06:07 +01:00
Daan De Meyer
e1536d1fb0 repart: Allow specifying --copy-from more than once
Definitions will be synthesized from each of the given images.
2023-08-11 11:05:31 +02:00
Daan De Meyer
39b4649fc1 repart: Reword --copy-from docs 2023-08-10 10:46:14 +02:00
Daan De Meyer
1e46985a60 repart: Add --copy-from option
--copy-from synthesizes partition definitions from the given image
which are then applied to the repart algorithm. In its most basic
form, this allows copying an image to another device but it can
also be combined with --definitions to copy + add partitions in the
same call to repart.
2023-08-03 11:12:25 +02:00
Daan De Meyer
7e81a84448 Revert "repart: Add --oem and OEM="
This reverts commit 47c7805579.
2023-08-01 15:10:24 +02:00
Daan De Meyer
47c7805579 repart: Add --oem and OEM=
--oem can be used to only install OEM partitions (usr, verity,
verity-sig, ...). OEM= is used to indicate OEM partitions. If unset,
defaults to !FactoryReset. We also add a credential repart.oem to
allow configuring --oem via a credential.
2023-08-01 07:53:50 +02:00
Luca Boccassi
9bb4f9f2ff
Merge pull request #27926 from DaanDeMeyer/repart-offline
repart: Add --offline argument
2023-06-05 19:11:41 +01:00
Lennart Poettering
24945c28db man: parition → partition typo fix
Follow-up for: #27848
2023-06-05 14:05:49 +02:00
Daan De Meyer
fc10b158ef repart: Add --offline argument
This allows the user to explicit configure whether loop devices
should be used to build the image or not.
2023-06-05 13:56:49 +02:00
Daan De Meyer
c4b7e0f812
Merge pull request #27844 from DaanDeMeyer/repart-arch
repart: Add --architecture option
2023-05-31 23:00:19 +02:00
Daan De Meyer
9786dfe60f repart: Add --architecture option
This option allows overriding the architecture that's used for the
architecture specific partition types. This is useful to allow
reusing the same repart configuration to produce the same image for
different architectures.
2023-05-31 13:58:16 +02:00
Zbigniew Jędrzejewski-Szmek
df73880106 man/repart: document partition creation order
Fixes #22974.

The text is reworded a bit too. In particular, it's "partitions" that are not
reordered, not "partition table slots". If we were reordering things, we'd move
the partitions between slots. The slots themselves are not moveable.
2023-05-30 13:41:24 +02:00
Zbigniew Jędrzejewski-Szmek
8fb350049b man: fixes for assorted issues reported by the manpage-l10n project
Fixes #26761.
2023-05-17 12:25:01 +02:00
Lennart Poettering
9ea811914f man: document image policy syntax and semantics, and the hooks in the various components 2023-04-05 20:55:15 +02:00
Daan De Meyer
e1878ef72a repart: Allow configuring sector size
Let's allow users to configure the (logical) sector size of their
image. This is required when building images for a 4k sector size
disk on a 512b sector size host or vice-versa.
2023-01-17 20:09:22 +01:00
Daan De Meyer
84a4d23f52 repart: Use "defer" in docs instead of "skip" 2022-12-15 15:45:00 +01:00
Daan De Meyer
8275334bec repart: Rename --skip-partitions to --defer-partitions
Defer is better because it indicates that we still intend to
populate these partitions later.
2022-12-14 13:20:32 +09:00
Daan De Meyer
7d505753f1 repart: Add --skip-partitions=
--include-partitions and --exclude-partitions now fully exclude
partitions from repart. Whenever a partition type is excluded, we
don't take any partitions of that type into account at all when
running systemd-repart.

--skip-partitions= is introduced to do what --exclude-partitions did
previously. Any skipped partitions are taken into acount when doing
size calculations, but are not yet populated.

Why do we need both concepts? Exclusion is needed so that we can
use shared repart definitions to generate bootable and non-bootable
images. When generating a non-bootable image, we use --exclude-partitions
to exclude the ESP partition. Skipping is needed so that we can
populate the root partition while skipping the ESP partition, get
the roothash of the root partition, use that to generate a UKI, and
finally populate the ESP partition with the UKI included.
2022-11-25 12:07:38 +01:00
Daan De Meyer
81d1098bc1 repart: Add --include/--exclude-partitions
Let's allow filtering the partitions to operate on by partition
type UUID. This is necessary when building bootable images with a
verity protected root/usr partition as we can only build the UKI
image when we have the verity roothash which means we cannot populate
the EFI partition yet when we run repart initially to determine the
verity roothash.
2022-11-15 13:45:25 +01: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
Daan De Meyer
4cee83331c repart: Add --split option to generate split artifacts
For use with sysupdate or other systemd tooling, it's useful to be
able to generate split artifacts from disk images, where each
partition is written to a separate file. Let's support this with
a --split switch for repart and a SplitName= configuration option.

--split enables split artifacts generation, and SplitName= configures
for which partition to generate split artifacts, and which suffix to
add to the split artifact name.

For SplitName=, we add support for some extra specifiers, more specifically
the partition Type UUID and the partition UUID.
2022-09-22 15:10:03 +02:00
Zbigniew Jędrzejewski-Szmek
b66a6e1a58 man: "the initial RAM disk" → "the initrd"
In many places we spelled out the phrase behind "initrd" in full, but this
isn't terribly useful. In fact, no "RAM disk" is used, so emphasizing this
is just confusing to the reader. Let's just say "initrd" everywhere, people
understand what this refers to, and that it's in fact an initramfs image.

Also, s/i.e./e.g./ where appropriate.

Also, don't say "in RAM", when in fact it's virtual memory, whose pages
may or may not be loaded in page frames in RAM, and we have no control over
this.

Also, add <filename></filename> and other minor cleanups.
2022-09-20 16:48:50 +02:00
Lennart Poettering
02ef97cde0 repart: hook up new TPM2 signed policies with repart 2022-09-08 16:34:27 +02:00
Richard Phibel
ddf259311f man: document support for drop-in files in systemd-repart 2022-08-12 19:09:07 +02:00
Richard Phibel
ea2aaff80e man: document support for list of definitions directories in systemd-repart 2022-08-12 18:13:30 +02:00
Lennart Poettering
252d626711 repart: add --image= switch
This is similar to the --image= switch in the other tools, like
systemd-sysusers or systemd-tmpfiles, i.e. it apply the configuration
from the image to the image.

This is particularly useful for downloading minimized GPT image, and
then extending it to the desired size via:

   # systemd-repart --image=foo.image --size=5G
2021-04-19 23:16:02 +02:00
Lennart Poettering
8d0d1a309e man: share a common explanation for --json= 2021-01-21 18:21:41 +01:00
Lennart Poettering
896e678bea repart: port to table_print_with_pager()
This adds support for showing a pager, turning of the legend, like in
the other tools.
2021-01-21 18:14:21 +01:00
Lennart Poettering
cf1e172d58 man: document new features 2020-12-17 20:02:32 +01:00
Yu Watanabe
db9ecf0501 license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
Frantisek Sumsal
69e3234db7 tree-wide: fix typos found by codespell
Reported by Fossies.org
2020-09-14 15:32:37 +02:00