]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
man: make ID valid
authorDavid Tardon <dtardon@redhat.com>
Sat, 23 Dec 2023 16:22:04 +0000 (17:22 +0100)
committerDavid Tardon <dtardon@redhat.com>
Mon, 25 Dec 2023 09:40:40 +0000 (10:40 +0100)
The id attribute is of type ID, defined at
https://www.w3.org/TR/1998/REC-xml-19980210#id . It may contain only
selected non-alphanumeric characters; '@' is not among them.

man/systemd-backlight@.service.xml
man/systemd-fsck@.service.xml
man/systemd-integritysetup@.service.xml
man/systemd-makefs@.service.xml
man/systemd-veritysetup@.service.xml
man/user@.service.xml
tools/make-man-index.py

index 431b27bbb095724ed7f76c86af745dc53301480d..95fa518bffd45949cf8f2edc03e8e9b826365db4 100644 (file)
@@ -3,7 +3,7 @@
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
 <!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
-<refentry id="systemd-backlight@.service" conditional='ENABLE_BACKLIGHT'
+<refentry id="systemd-backlight_.service" conditional='ENABLE_BACKLIGHT'
           xmlns:xi="http://www.w3.org/2001/XInclude">
 
   <refentryinfo>
index 5f351ded356e5607e7e8e7f1e2ed10ea63b742c8..a138bd0107cd43e7af0419ac9d4a8159bd521736 100644 (file)
@@ -3,7 +3,7 @@
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
 <!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
-<refentry id="systemd-fsck@.service" xmlns:xi="http://www.w3.org/2001/XInclude">
+<refentry id="systemd-fsck_.service" xmlns:xi="http://www.w3.org/2001/XInclude">
 
   <refentryinfo>
     <title>systemd-fsck@.service</title>
index a090b1c7639a922050e76da983a74ce940f734a8..831c3690e1ba88b2a04f898c71738f28bf3c8e4c 100644 (file)
@@ -3,7 +3,7 @@
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
 <!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
-<refentry id="systemd-integritysetup@.service" conditional='HAVE_LIBCRYPTSETUP'
+<refentry id="systemd-integritysetup_.service" conditional='HAVE_LIBCRYPTSETUP'
           xmlns:xi="http://www.w3.org/2001/XInclude">
 
   <refentryinfo>
index 0b54ba3584a1aceb08fa62967b1f33906f968005..5447de0405601d81829ca11cacaa6b754630982a 100644 (file)
@@ -3,7 +3,7 @@
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
 <!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
-<refentry id="systemd-makefs@.service">
+<refentry id="systemd-makefs_.service">
 
   <refentryinfo>
     <title>systemd-makefs@.service</title>
index 4a4d8d9814a68ed594e288f6ec8a0b7c45a1dedb..a549b41b704dd04e9d2c8cca2eeca5f66c0a6645 100644 (file)
@@ -3,7 +3,7 @@
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
 <!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
-<refentry id="systemd-veritysetup@.service" conditional='HAVE_LIBCRYPTSETUP'
+<refentry id="systemd-veritysetup_.service" conditional='HAVE_LIBCRYPTSETUP'
           xmlns:xi="http://www.w3.org/2001/XInclude">
 
   <refentryinfo>
index bdc2aa22f11934c71007ab01624cc9b3e3ea028f..6d0eaa4e0451a932df977ff566e6a3e8b1e791f2 100644 (file)
@@ -3,7 +3,7 @@
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
 <!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
-<refentry id="user@.service">
+<refentry id="user_.service">
   <refentryinfo>
     <title>user@.service</title>
     <productname>systemd</productname>
index 579dd405c227a82fb58bf09568d7212a14c183cc..b4b262b508daf5ab110a542ac8c0a26c6193c984 100755 (executable)
@@ -46,7 +46,7 @@ This index contains {count} entries, referring to {pages} individual manual page
 
 def check_id(page, t):
     page_id = t.getroot().get('id')
-    if not re.search('/' + page_id + '[.]', page):
+    if not re.search('/' + page_id + '[.]', page.translate(str.maketrans('@', '_'))):
         raise ValueError(f"id='{page_id}' is not the same as page name '{page}'")
 
 def make_index(pages):