chiark / gitweb /
man: generate configured paths in manpages
authorFilipe Brandenburger <filbranden@google.com>
Wed, 27 May 2015 09:38:19 +0000 (02:38 -0700)
committerSven Eden <yamakuzure@gmx.net>
Tue, 14 Mar 2017 09:01:12 +0000 (10:01 +0100)
In particular, use /lib/systemd instead of /usr/lib/systemd in distributions
like Debian which still have not adopted a /usr merge setup.

Use XML entities from man/custom-entities.ent to replace configured paths while
doing XSLT processing of the original XML files. There was precedent of some
files (such as systemd.generator.xml) which were already using this approach.

This addresses most of the (manual) fixes from this patch:
http://anonscm.debian.org/cgit/pkg-systemd/systemd.git/tree/debian/patches/Fix-paths-in-man-pages.patch?h=experimental-220

The idea of using generic XML entities was presented here:
http://lists.freedesktop.org/archives/systemd-devel/2015-May/032240.html

This patch solves almost all the issues, with the exception of:
- Path to /bin/mount and /bin/umount.
- Generic statements about preference of /lib over /etc.

These will be handled separately by follow up patches.

Tested:
- With default configure settings, ran "make install" to two separate
  directories and compared the output to confirm they matched exactly.
- Used a set of configure flags including $CONFFLAGS from Debian:
  http://anonscm.debian.org/cgit/pkg-systemd/systemd.git/tree/debian/rules
  Installed the tree and confirmed the paths use /lib/systemd instead of
  /usr/lib/systemd and that no other unexpected differences exist.
- Confirmed that `make distcheck` still passes.

12 files changed:
man/libelogind-pkgconfig.xml
man/loginctl.xml
man/logind.conf.xml
man/logind.xml
man/pam_elogind.xml
man/sd-login.xml
man/sd_get_seats.xml
man/sd_login_monitor_new.xml
man/sd_pid_get_session.xml
man/sd_seat_get_active.xml
man/sd_session_is_active.xml
man/sd_uid_get_state.xml

index c940b15b3ae7d2caf43b37dbb2233a76c8b921da..bda91ce50ac4c8e8db19140a223535c37a85988c 100644 (file)
@@ -1,6 +1,9 @@
 <?xml version="1.0"?>
 <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-          "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+          "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
 
 <refsect1>
   <title>Notes</title>
index 4e09e7a1c07eea96704180172c029607118a8364..9fecb7a33c8e28ce87b16deb6aacf3e02bf443ce 100644 (file)
@@ -1,6 +1,9 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
-  "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+  "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
 
 <!--
   This file is part of systemd.
index 9332e80756a6adc77a9fbff050b5952ecfa621ec..4deaadb766b85dacbc9f017bb64a8acc2cf97edd 100644 (file)
@@ -1,6 +1,9 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
-  "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+  "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
 
 <!--
   This file is part of systemd.
   </refnamediv>
 
   <refsynopsisdiv>
-    <para><filename>/etc/systemd/logind.conf</filename></para>
-    <para><filename>/etc/systemd/logind.conf.d/*.conf</filename></para>
+    <para><filename>&pkgsysconfdir;/logind.conf</filename></para>
+    <para><filename>&pkgsysconfdir;/logind.conf.d/*.conf</filename></para>
     <para><filename>/run/systemd/logind.conf.d/*.conf</filename></para>
-    <para><filename>/usr/lib/systemd/logind.conf.d/*.conf</filename></para>
+    <para><filename>&rootlibexecdir;/logind.conf.d/*.conf</filename></para>
   </refsynopsisdiv>
 
   <refsect1>
index 7afacbf3450203e2c98a02af2126e59a2df5d3d4..1416d884cef8438a560bb67f1dcd5d5eb9ba350e 100644 (file)
@@ -1,6 +1,9 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
-  "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+  "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
 
 <!--
   This file is part of systemd.
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 -->
 
-<refentry id="logind.service">
+<refentry id="systemd-logind.service" conditional='ENABLE_LOGIND'>
 
   <refentryinfo>
-    <title>logind.service</title>
+    <title>systemd-logind.service</title>
     <productname>systemd</productname>
 
     <authorgroup>
   </refentryinfo>
 
   <refmeta>
-    <refentrytitle>logind.service</refentrytitle>
+    <refentrytitle>systemd-logind.service</refentrytitle>
     <manvolnum>8</manvolnum>
   </refmeta>
 
   <refnamediv>
-    <refname>logind.service</refname>
-    <refname>logind</refname>
+    <refname>systemd-logind.service</refname>
+    <refname>systemd-logind</refname>
     <refpurpose>Login manager</refpurpose>
   </refnamediv>
 
   <refsynopsisdiv>
-    <para><filename>logind.service</filename></para>
-    <para><filename>/usr/lib/systemd/logind</filename></para>
+    <para><filename>systemd-logind.service</filename></para>
+    <para><filename>&rootlibexecdir;/systemd-logind</filename></para>
   </refsynopsisdiv>
 
   <refsect1>
     <title>Description</title>
 
-    <para><command>logind</command> is a system service that
+    <para><command>systemd-logind</command> is a system service that
     manages user logins. It is responsible for:</para>
 
     <itemizedlist>
     <para>See the <ulink
     url="http://www.freedesktop.org/wiki/Software/systemd/logind">
     logind D-Bus API Documentation</ulink> for information about the
-    APIs <filename>logind</filename> provides.</para>
+    APIs <filename>systemd-logind</filename> provides.</para>
 
     <para>For more information on the inhibition logic see the <ulink
     url="http://www.freedesktop.org/wiki/Software/systemd/inhibit">Inhibitor
index 7c3690aab28cc6b1abd1bc78358f1e1e16fc0e39..d2f183b76ed30b0e0f8eb29e9074ac0ff1c1b54f 100644 (file)
@@ -1,6 +1,9 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
-  "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+  "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
 
 <!--
   This file is part of systemd.
index 06ffc6906ffe14c54408f31d34f2724a1f30dd93..d220025b5a9e129500d068438712f62f358fa751 100644 (file)
@@ -1,6 +1,9 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
-  "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+  "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
 
 <!--
   This file is part of systemd.
index c6b133e665c323ecefde3298c0ff692be5d1bf81..72cf2f9aeeda1f23fca2faac5a6f541830749ebd 100644 (file)
@@ -1,6 +1,9 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
-  "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+  "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
 
 <!--
   This file is part of systemd.
index 7319c061c975cbbc1f17fcc06b4054902d19faa7..f24d8b3ce4237d57dc03baeb1e1f5fe51db67092 100644 (file)
@@ -1,6 +1,9 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
-  "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+  "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
 
 <!--
   This file is part of systemd.
index fac072a4c00c54f267d6a7d1f5fb0bee57984c85..60bc7ed886e0c0b421c82e7539bae5182612aee9 100644 (file)
@@ -1,6 +1,9 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
-  "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+  "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
 
 <!--
   This file is part of systemd.
index e0002c205072db00fd1f72b3b049212fa066571b..8fda8b3f819b399ae0045199251b272ad6e1d19f 100644 (file)
@@ -1,6 +1,9 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
-  "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+  "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
 
 <!--
   This file is part of systemd.
index 069cbe091ba5218a9dae3babe4aff8bd0f39c0b0..70d201e29b7f5d580f4b1c078c6d1394780a0d81 100644 (file)
@@ -1,6 +1,9 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
-  "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+  "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
 
 <!--
   This file is part of systemd.
index 4218f73818c0f12277b93a4f4b0d5ce1acf35ca4..fbadb5016d3f0dd1cacb2e7628f53899d1a9eeea 100644 (file)
@@ -1,6 +1,9 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
-  "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+  "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
 
 <!--
   This file is part of systemd.