From 597c6cc1195a986e8f89921aa89505b0eacf8181 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C5=A0t=C4=9Bp=C3=A1n=20N=C4=9Bmec?= Date: Mon, 11 Nov 2024 20:10:00 +0100 Subject: [PATCH] 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 '\\|{title}" f"{has}" f"|s|{has}|" f"{should_have}|' {man}.xml" ) --- man/crypttab.xml | 2 +- man/journal-upload.conf.xml | 2 +- man/libsystemd.xml | 2 +- man/nss-resolve.xml | 2 +- man/org.freedesktop.hostname1.xml | 4 ++-- man/org.freedesktop.systemd1.xml | 4 ++-- man/sd-id128.xml | 2 +- man/sd_bus_creds_get_pid.xml | 2 +- man/sd_bus_message_new_signal.xml | 2 +- man/sd_bus_message_verify_type.xml | 2 +- man/sd_bus_reply_method_error.xml | 2 +- man/sd_bus_reply_method_return.xml | 2 +- man/sd_hwdb_new.xml | 2 +- man/smbios-type-11.xml | 6 +++--- man/systemd-cryptenroll.xml | 2 +- man/systemd-makefs@.service.xml | 2 +- man/systemd-random-seed.service.xml | 2 +- man/systemd-repart.xml | 2 +- man/systemd-run-generator.xml | 6 +++--- man/systemd-sysext.xml | 2 +- man/systemd.image-policy.xml | 4 ++-- man/systemd.pcrlock.xml | 4 ++-- man/systemd.special.xml | 22 +++++++++++----------- man/systemd.system-credentials.xml | 4 ++-- man/systemd.unit.xml | 4 ++-- man/systemd.v.xml | 2 +- man/timesyncd.conf.xml | 8 ++++---- 27 files changed, 50 insertions(+), 50 deletions(-) diff --git a/man/crypttab.xml b/man/crypttab.xml index 2ebc3bf20a..c91e8c2819 100644 --- a/man/crypttab.xml +++ b/man/crypttab.xml @@ -903,7 +903,7 @@ Takes an absolute path to a TPM2 pcrlock policy file, as produced by the - systemd-pcrlock1 + systemd-pcrlock8 tool. This permits locking LUKS2 volumes to a local policy of allowed PCR values with variants. See systemd-cryptenroll1 diff --git a/man/journal-upload.conf.xml b/man/journal-upload.conf.xml index 7d3f22f96b..7792617e51 100644 --- a/man/journal-upload.conf.xml +++ b/man/journal-upload.conf.xml @@ -91,7 +91,7 @@ configures the time to wait for the connectivity to get restored. If the server is not reachable over the network for the configured time, systemd-journal-upload exits. Takes a value in seconds (or in other time units if suffixed with "ms", "min", "h", etc). - For details, see systemd.time5. + For details, see systemd.time7. diff --git a/man/libsystemd.xml b/man/libsystemd.xml index de41d2bf72..2e1f5f5f37 100644 --- a/man/libsystemd.xml +++ b/man/libsystemd.xml @@ -82,7 +82,7 @@ See Also systemd1 - libudev1 + libudev3 pkg-config1 Interface Portability and Stability Promise diff --git a/man/nss-resolve.xml b/man/nss-resolve.xml index 0922eef3af..34088d2d19 100644 --- a/man/nss-resolve.xml +++ b/man/nss-resolve.xml @@ -175,7 +175,7 @@ netgroup: nis nss-myhostname8 nss-mymachines8 nsswitch.conf5 - systemd.syntax5 + systemd.syntax7 diff --git a/man/org.freedesktop.hostname1.xml b/man/org.freedesktop.hostname1.xml index 9e712c94c2..e6eac25180 100644 --- a/man/org.freedesktop.hostname1.xml +++ b/man/org.freedesktop.hostname1.xml @@ -259,7 +259,7 @@ node /org/freedesktop/hostname1 { are not necessary. Use gethostname2, /etc/hostname (possibly with per-distribution fallbacks), and - machine-info3 + machine-info5 for that. For more information on these files and syscalls see the respective man pages. KernelName, KernelRelease, and @@ -376,7 +376,7 @@ node /org/freedesktop/hostname1 { To properly handle name lookups with changing local hostnames without having to edit /etc/hosts, we recommend using systemd-hostnamed in combination - with nss-myhostname3. + with nss-myhostname8. Here are some recommendations to follow when generating a static (internet) hostname from a pretty diff --git a/man/org.freedesktop.systemd1.xml b/man/org.freedesktop.systemd1.xml index 7e8b124c09..9cd6a69311 100644 --- a/man/org.freedesktop.systemd1.xml +++ b/man/org.freedesktop.systemd1.xml @@ -1553,7 +1553,7 @@ node /org/freedesktop/systemd1 { Similarly, PresetUnitFiles() enables/disables one or more unit files according to the preset policy. See - systemd.preset7 for more + systemd.preset5 for more information. Similarly, MaskUnitFiles() masks unit files and @@ -4740,7 +4740,7 @@ node /org/freedesktop/systemd1/unit/avahi_2ddaemon_2eservice { TimeoutStartUSec, TimeoutStopUSec and TimeoutAbortUSec contain the start, stop and abort timeouts, in microseconds. Note the slight difference in naming when compared to the matching unit file settings (see - systemd.service7): + systemd.service5): these bus properties strictly use microseconds (and thus are suffixed …USec) while the unit file settings default to a time unit of seconds (and thus are suffixed …Sec), unless a different unit is explicitly specified. This reflects that fact that diff --git a/man/sd-id128.xml b/man/sd-id128.xml index 5a2ca4636a..c568fbf4bc 100644 --- a/man/sd-id128.xml +++ b/man/sd-id128.xml @@ -289,7 +289,7 @@ int main(int argc, char **argv) { sd_id128_get_machine3 printf3 journalctl1 - sd-journal7 + sd-journal3 pkg-config1 machine-id5 diff --git a/man/sd_bus_creds_get_pid.xml b/man/sd_bus_creds_get_pid.xml index 0630329eb5..10b326d668 100644 --- a/man/sd_bus_creds_get_pid.xml +++ b/man/sd_bus_creds_get_pid.xml @@ -562,7 +562,7 @@ systemd1 sd-bus3 - sd_bus_creds_new_from_pid2 + sd_bus_creds_new_from_pid3 fork2 execve2 credentials7 diff --git a/man/sd_bus_message_new_signal.xml b/man/sd_bus_message_new_signal.xml index 356c4ad45a..78645650c0 100644 --- a/man/sd_bus_message_new_signal.xml +++ b/man/sd_bus_message_new_signal.xml @@ -56,7 +56,7 @@ parameter. The signal will be sent to path path, on the interface interface, member member. When this message is sent, no reply is expected. See - sd_bus_message_new_method_call1 + sd_bus_message_new_method_call3 for a short description of the meaning of the path, interface, and member parameters. diff --git a/man/sd_bus_message_verify_type.xml b/man/sd_bus_message_verify_type.xml index 0944079e82..878643d133 100644 --- a/man/sd_bus_message_verify_type.xml +++ b/man/sd_bus_message_verify_type.xml @@ -40,7 +40,7 @@ current location in the message m matches the specified type and contents. If non-zero, parameter type must be one of the types specified in - sd_bus_message_append1. + sd_bus_message_append3. If non-null, parameter contents must be a valid sequence of complete types. If both type and contents are specified type must be a container type. diff --git a/man/sd_bus_reply_method_error.xml b/man/sd_bus_reply_method_error.xml index 66a49fed47..d9ca18d473 100644 --- a/man/sd_bus_reply_method_error.xml +++ b/man/sd_bus_reply_method_error.xml @@ -156,7 +156,7 @@ In addition, any error returned by - sd_bus_send1 + sd_bus_send3 may be returned. diff --git a/man/sd_bus_reply_method_return.xml b/man/sd_bus_reply_method_return.xml index aca5554bc5..753edf444c 100644 --- a/man/sd_bus_reply_method_return.xml +++ b/man/sd_bus_reply_method_return.xml @@ -111,7 +111,7 @@ In addition, any error returned by - sd_bus_send1 + sd_bus_send3 may be returned. diff --git a/man/sd_hwdb_new.xml b/man/sd_hwdb_new.xml index 56f922b55b..8cbe1b560f 100644 --- a/man/sd_hwdb_new.xml +++ b/man/sd_hwdb_new.xml @@ -138,7 +138,7 @@ systemd1 systemd-udevd.service8 sd-hwdb3 - systemd-hwdb3 + systemd-hwdb8 diff --git a/man/smbios-type-11.xml b/man/smbios-type-11.xml index 2fc215ecbd..4d78f612e7 100644 --- a/man/smbios-type-11.xml +++ b/man/smbios-type-11.xml @@ -29,7 +29,7 @@ Various OS components process SMBIOS Type 11 vendor strings that a virtual machine manager (VMM) may set and a virtual machine (VM) receives. SMBIOS Type 11 vendor strings may play a similar role as - kernel-command-line1 + kernel-command-line7 parameters but generally are under control of the VMM rather than the boot loader or UKI. For details on SMBIOS Type 11 see the System @@ -60,7 +60,7 @@ This allows configuration of additional kernel command line options, and is read by the kernel UEFI stub. For details see - systemd-stub1. + systemd-stub7. @@ -70,7 +70,7 @@ This allows configuration of additional kernel command line options for Boot Loader Specification Type 1 entries, and is read by systemd-boot. For details see - systemd-boot1. + systemd-boot7. diff --git a/man/systemd-cryptenroll.xml b/man/systemd-cryptenroll.xml index 4fab74b8cc..63d378fbc6 100644 --- a/man/systemd-cryptenroll.xml +++ b/man/systemd-cryptenroll.xml @@ -628,7 +628,7 @@ Configures a TPM2 pcrlock policy to bind encryption to. Expects a path to a pcrlock policy file as generated by the - systemd-pcrlock1 + systemd-pcrlock8 tool. If a TPM2 device is enrolled and this option is not used but a file pcrlock.json is found in /run/systemd/ or /var/lib/systemd/ it is automatically used. Assign an empty string to turn this diff --git a/man/systemd-makefs@.service.xml b/man/systemd-makefs@.service.xml index c5b3d85b52..a084f9d08c 100644 --- a/man/systemd-makefs@.service.xml +++ b/man/systemd-makefs@.service.xml @@ -86,7 +86,7 @@ See Also systemd1 - systemd.mount8 + systemd.mount5 systemd-fstab-generator8 systemd-repart8 mkfs.btrfs8 diff --git a/man/systemd-random-seed.service.xml b/man/systemd-random-seed.service.xml index b55e5deab1..eaf092860c 100644 --- a/man/systemd-random-seed.service.xml +++ b/man/systemd-random-seed.service.xml @@ -90,7 +90,7 @@ random4 systemd-boot7 systemd-stub7 - bootctl4 + bootctl1 systemd-boot-random-seed.service8 diff --git a/man/systemd-repart.xml b/man/systemd-repart.xml index 575be14912..261053392e 100644 --- a/man/systemd-repart.xml +++ b/man/systemd-repart.xml @@ -699,7 +699,7 @@ systemd-repart --make-ddi=sysext \ systemd-sysext refresh The DDI generated that way may be applied to the system with - systemd-sysext1. + systemd-sysext8. diff --git a/man/systemd-run-generator.xml b/man/systemd-run-generator.xml index a78c1898bc..f7515239e8 100644 --- a/man/systemd-run-generator.xml +++ b/man/systemd-run-generator.xml @@ -37,7 +37,7 @@ FailureAction=exit configured by default, thus ensuring that the system is shut down as soon as the command completes. The exit status of the command line is propagated to the invoking container manager, if this applies (which might propagate this further, to the calling shell — e.g. - systemd-nspawn7 does this). If + systemd-nspawn1 does this). If this option is used multiple times the unit file will contain multiple ExecStart= lines, to execute all commands in order. The command is started as regular service, i.e. with DefaultDependencies= on. @@ -55,7 +55,7 @@ Example Use a command like the following to add a user to the user database inside a container run with - systemd-nspawn7: + systemd-nspawn1: # systemd-nspawn -D mycontainer -b systemd.run='"adduser test"' (Note the requirement for double quoting in the command line above. The first level of quoting ('') is @@ -72,7 +72,7 @@ systemd1 systemctl1 kernel-command-line7 - systemd-nspawn7 + systemd-nspawn1 systemd.unit5 systemd.service5 diff --git a/man/systemd-sysext.xml b/man/systemd-sysext.xml index c9bbf49907..3ebcb91abf 100644 --- a/man/systemd-sysext.xml +++ b/man/systemd-sysext.xml @@ -152,7 +152,7 @@ in the extension image. The systemd-confext concept follows the same principle as the - systemd-sysext1 + systemd-sysext8 functionality but instead of working on /usr and /opt, confext will extend only /etc. Files and directories contained in the confext images outside of the /etc/ hierarchy are not diff --git a/man/systemd.image-policy.xml b/man/systemd.image-policy.xml index f26aeb5b5e..95e6e2631f 100644 --- a/man/systemd.image-policy.xml +++ b/man/systemd.image-policy.xml @@ -152,7 +152,7 @@ going to make use of any discovered swap device, regardless if the policy would allow that or not. Use the image-policy command of the - systemd-analyze8 tool + systemd-analyze1 tool to analyze image policy strings, and determine what a specific policy string means for a specific partition. @@ -184,7 +184,7 @@ systemd-dissect1 systemd-gpt-auto-generator8 systemd-sysext8 - systemd-analyze8 + systemd-analyze1 diff --git a/man/systemd.pcrlock.xml b/man/systemd.pcrlock.xml index 6f07dc8159..2efa122dba 100644 --- a/man/systemd.pcrlock.xml +++ b/man/systemd.pcrlock.xml @@ -40,7 +40,7 @@ *.pcrlock files define expected TPM2 PCR measurements of components involved in the boot - process. systemd-pcrlock1 + process. systemd-pcrlock8 uses such pcrlock files to analyze and predict TPM2 PCR measurements. The pcrlock files are JSON arrays that follow a subset of the TCG Canonical Event Log Format @@ -292,7 +292,7 @@ See Also systemd1 - systemd-pcrlock1 + systemd-pcrlock8 diff --git a/man/systemd.special.xml b/man/systemd.special.xml index 5fa4baed20..ad7e35661f 100644 --- a/man/systemd.special.xml +++ b/man/systemd.special.xml @@ -409,7 +409,7 @@ initrd-fs.target - systemd-fstab-generator3 + systemd-fstab-generator8 automatically adds dependencies of type Before= to sysroot-usr.mount and all mount points found in /etc/fstab that have the mount option set @@ -426,9 +426,9 @@ A special initrd target unit that is reached when the root filesystem device is available, but before it has been mounted. - systemd-fstab-generator3 + systemd-fstab-generator8 and - systemd-gpt-auto-generator3 + systemd-gpt-auto-generator8 automatically setup the appropriate dependencies to make this happen. @@ -438,7 +438,7 @@ initrd-root-fs.target - systemd-fstab-generator3 + systemd-fstab-generator8 automatically adds dependencies of type Before= to the sysroot.mount unit, which is generated from the kernel command line's root= setting (or equivalent). @@ -449,7 +449,7 @@ initrd-usr-fs.target - systemd-fstab-generator3 + systemd-fstab-generator8 automatically adds dependencies of type Before= to the sysusr-usr.mount unit, which is generated from the kernel command line's usr= switch. Services may order themselves after this target unit in order to @@ -495,7 +495,7 @@ local-fs.target - systemd-fstab-generator3 + systemd-fstab-generator8 automatically adds dependencies of type Before= to all mount units that refer to local mount points for this target unit. In addition, it @@ -625,7 +625,7 @@ Similar to cryptsetup.target, but for encrypted devices which are accessed over the network. It is used for - crypttab8 + crypttab5 entries marked with . @@ -636,7 +636,7 @@ Similar to veritysetup.target, but for verity integrity protected devices which are accessed over the network. It is used for - veritytab8 + veritytab5 entries marked with . @@ -1005,7 +1005,7 @@ devices after services that synthesize these block devices. In particular, this is intended to be used with storage services (such as systemd-cryptsetup@.service5/ - systemd-veritysetup@.service5) + systemd-veritysetup@.service8) that allocate and manage a virtual block device. Storage services are ordered before an instance of blockdev@.target, and the consumer units after it. The ordering is particularly relevant during shutdown, as it ensures that the mount is deactivated first and the @@ -1304,7 +1304,7 @@ There are four .slice units which form the basis of the hierarchy for assignment of resources for services, users, and virtual machines or containers. See - systemd.slice7 + systemd.slice5 for details about slice units. @@ -1501,7 +1501,7 @@ PartOf=graphical-session.target There are four .slice units which form the basis of the user hierarchy for assignment of resources for user applications and services. See - systemd.slice7 + systemd.slice5 for details about slice units and the documentation about Desktop Environments for further information. diff --git a/man/systemd.system-credentials.xml b/man/systemd.system-credentials.xml index 7962bb257a..b8612aa8a5 100644 --- a/man/systemd.system-credentials.xml +++ b/man/systemd.system-credentials.xml @@ -184,7 +184,7 @@ Read by both systemd-firstboot1 and - systemd-sysusers1, + systemd-sysusers8, and only honoured if no root password has been configured before. @@ -198,7 +198,7 @@ both systemd-firstboot1 and - systemd-sysusers1, + systemd-sysusers8, and only honoured if no root shell has been configured before. diff --git a/man/systemd.unit.xml b/man/systemd.unit.xml index 9b7a058842..2c7f0bd71f 100644 --- a/man/systemd.unit.xml +++ b/man/systemd.unit.xml @@ -1141,7 +1141,7 @@ Both settings take a time span with the default unit of seconds, but other units may be specified, see - systemd.time5. + systemd.time7. The default is infinity (job timeouts disabled), except for device units where JobRunningTimeoutSec= defaults to DefaultDeviceTimeoutSec=. @@ -1185,7 +1185,7 @@ interval is a time span with the default unit of seconds, but other units may be specified, see - systemd.time5. + systemd.time7. The special value infinity can be used to limit the total number of start attempts, even if they happen at large time intervals. Defaults to DefaultStartLimitIntervalSec= in manager configuration file, and may diff --git a/man/systemd.v.xml b/man/systemd.v.xml index 43e77bdba2..a340d1e4b7 100644 --- a/man/systemd.v.xml +++ b/man/systemd.v.xml @@ -156,7 +156,7 @@ systemd-nspawn1 systemd-dissect1 systemd.exec5 - systemd-sysupdate1 + systemd-sysupdate8 diff --git a/man/timesyncd.conf.xml b/man/timesyncd.conf.xml index 51c867ab29..922debfcfa 100644 --- a/man/timesyncd.conf.xml +++ b/man/timesyncd.conf.xml @@ -84,7 +84,7 @@ to a different server. Takes a time span value. The default unit is seconds, but other units may be specified, see - systemd.time5. + systemd.time7. Defaults to 5 seconds. @@ -99,7 +99,7 @@ Each setting takes a time span value. The default unit is seconds, but other units may be specified, see - systemd.time5. + systemd.time7. PollIntervalMinSec= defaults to 32 seconds and must not be smaller than 16 seconds. PollIntervalMaxSec= defaults to 34 min 8 s (2048 seconds) and must be larger than PollIntervalMinSec=. @@ -113,7 +113,7 @@ are made. Takes a time span value. The default unit is seconds, but other units may be specified, see - systemd.time5. + systemd.time7. Defaults to 30 seconds and must not be smaller than 1 second. @@ -127,7 +127,7 @@ reboots. Takes a time interval value. The default unit is seconds, but other units may be specified, see - systemd.time5. + systemd.time7. Defaults to 60 seconds. -- 2.25.1