a52f674
From 8d467dc76e470298b384d104be9822c528b81c2e Mon Sep 17 00:00:00 2001
ca73a27
From: Lennart Poettering <lennart@poettering.net>
ca73a27
Date: Fri, 14 Feb 2014 15:56:19 +0100
ca73a27
Subject: [PATCH] man: always place <programlisting> and </programlisting> in a
ca73a27
 line with actual sources, so that we don't get spurious newlines in the man
ca73a27
 page output
ca73a27
a52f674
(cherry picked from commit 9fccdb0f64d12bc09a71442dd0af2248c1aa3e89)
a52f674
ca73a27
Conflicts:
ca73a27
	man/systemd-socket-proxyd.xml
ca73a27
---
ca73a27
 man/daemon.xml                           |  3 +--
ca73a27
 man/kernel-install.xml                   |  8 ++------
ca73a27
 man/nss-myhostname.xml                   | 12 ++++--------
ca73a27
 man/sd_journal_get_fd.xml                |  3 +--
ca73a27
 man/systemctl.xml                        |  3 +--
ca73a27
 man/systemd-delta.xml                    | 12 ++++--------
ca73a27
 man/systemd-journal-gatewayd.service.xml | 16 +++++-----------
ca73a27
 man/systemd-run.xml                      |  3 +--
ca73a27
 man/systemd-sleep.conf.xml               |  6 ++----
ca73a27
 man/systemd.service.xml                  | 13 ++++---------
ca73a27
 man/timedatectl.xml                      | 18 ++++++------------
ca73a27
 man/tmpfiles.d.xml                       |  7 ++-----
ca73a27
 12 files changed, 33 insertions(+), 71 deletions(-)
ca73a27
ca73a27
diff --git a/man/daemon.xml b/man/daemon.xml
ca73a27
index 105826a..17d9dd6 100644
ca73a27
--- a/man/daemon.xml
ca73a27
+++ b/man/daemon.xml
ca73a27
@@ -777,8 +777,7 @@ AS_IF([test "x$with_systemdsystemunitdir" = "xyes" -o "x$with_systemdsystemunitd
ca73a27
          [with_systemdsystemunitdir=$def_systemdsystemunitdir])])
ca73a27
 AS_IF([test "x$with_systemdsystemunitdir" != "xno"],
ca73a27
       [AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])])
ca73a27
-AM_CONDITIONAL(HAVE_SYSTEMD, [test "x$with_systemdsystemunitdir" != "xno"])
ca73a27
-</programlisting>
ca73a27
+AM_CONDITIONAL(HAVE_SYSTEMD, [test "x$with_systemdsystemunitdir" != "xno"])</programlisting>
ca73a27
 
ca73a27
                         <para>This snippet allows automatic
ca73a27
                         installation of the unit files on systemd
ca73a27
diff --git a/man/kernel-install.xml b/man/kernel-install.xml
ca73a27
index 929ceef..3612b7d 100644
ca73a27
--- a/man/kernel-install.xml
ca73a27
+++ b/man/kernel-install.xml
ca73a27
@@ -90,9 +90,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
ca73a27
           <filename>/usr/lib/kernel/install.d/*.install</filename> and
ca73a27
           <filename>/etc/kernel/install.d/*.install</filename> with
ca73a27
           the arguments
ca73a27
-          <programlisting>
ca73a27
-add <replaceable>KERNEL-VERSION</replaceable> <filename>/boot/<replaceable>MACHINE-ID</replaceable>/<replaceable>KERNEL-VERSION</replaceable>/</filename>
ca73a27
-          </programlisting>
ca73a27
+          <programlisting>add <replaceable>KERNEL-VERSION</replaceable> <filename>/boot/<replaceable>MACHINE-ID</replaceable>/<replaceable>KERNEL-VERSION</replaceable>/</filename></programlisting>
ca73a27
           </para>
ca73a27
 
ca73a27
           <para>The kernel-install plugin <filename>50-depmod.install</filename> runs depmod for the <replaceable>KERNEL-VERSION</replaceable>.</para>
ca73a27
@@ -114,9 +112,7 @@ add <replaceable>KERNEL-VERSION</replaceable> <filename>/boot/<replaceable>MACHI
ca73a27
         <listitem>
ca73a27
           <para>Calls every executable <filename>/usr/lib/kernel/install.d/*.install</filename>
ca73a27
           and <filename>/etc/kernel/install.d/*.install</filename> with the arguments
ca73a27
-          <programlisting>
ca73a27
-remove <replaceable>KERNEL-VERSION</replaceable> <filename>/boot/<replaceable>MACHINE-ID</replaceable>/<replaceable>KERNEL-VERSION</replaceable>/</filename>
ca73a27
-          </programlisting>
ca73a27
+          <programlisting>remove <replaceable>KERNEL-VERSION</replaceable> <filename>/boot/<replaceable>MACHINE-ID</replaceable>/<replaceable>KERNEL-VERSION</replaceable>/</filename></programlisting>
ca73a27
           </para>
ca73a27
 
ca73a27
           <para><command>kernel-install</command> removes the entire directory
ca73a27
diff --git a/man/nss-myhostname.xml b/man/nss-myhostname.xml
ca73a27
index efbadac..cca3a99 100644
ca73a27
--- a/man/nss-myhostname.xml
ca73a27
+++ b/man/nss-myhostname.xml
ca73a27
@@ -86,8 +86,7 @@
ca73a27
         <refsect1>
ca73a27
                 <title>Example</title>
ca73a27
 
ca73a27
-                <programlisting>
ca73a27
-# /etc/nsswitch.conf
ca73a27
+<programlisting># /etc/nsswitch.conf
ca73a27
 
ca73a27
 passwd:         compat
ca73a27
 group:          compat
ca73a27
@@ -101,20 +100,17 @@ services:       db files
ca73a27
 ethers:         db files
ca73a27
 rpc:            db files
ca73a27
 
ca73a27
-netgroup:       nis
ca73a27
-                </programlisting>
ca73a27
+netgroup:       nis</programlisting>
ca73a27
 
ca73a27
                 <para>To test, use <command>glibc</command>'s <command>getent</command> tool:</para>
ca73a27
 
ca73a27
-                <programlisting>
ca73a27
-$ getent ahosts `hostname`
ca73a27
+                <programlisting>$ getent ahosts `hostname`
ca73a27
 ::1             STREAM omega
ca73a27
 ::1             DGRAM
ca73a27
 ::1             RAW
ca73a27
 127.0.0.2       STREAM
ca73a27
 127.0.0.2       DGRAM
ca73a27
-127.0.0.2       RAW
ca73a27
-                </programlisting>
ca73a27
+127.0.0.2       RAW</programlisting>
ca73a27
 
ca73a27
                 <para>In this case the local hostname is <varname>omega</varname>.</para>
ca73a27
 
ca73a27
diff --git a/man/sd_journal_get_fd.xml b/man/sd_journal_get_fd.xml
ca73a27
index 4b36f97..df7632f 100644
ca73a27
--- a/man/sd_journal_get_fd.xml
ca73a27
+++ b/man/sd_journal_get_fd.xml
ca73a27
@@ -330,8 +330,7 @@ int wait_for_changes(sd_journal *j) {
ca73a27
         pollfd.events = sd_journal_get_events(j);
ca73a27
         poll(&pollfd, 1, msec);
ca73a27
         return sd_journal_process(j);
ca73a27
-}
ca73a27
-                </programlisting>
ca73a27
+}</programlisting>
ca73a27
         </refsect1>
ca73a27
 
ca73a27
         <refsect1>
ca73a27
diff --git a/man/systemctl.xml b/man/systemctl.xml
ca73a27
index 25b03d8..cde1694 100644
ca73a27
--- a/man/systemctl.xml
ca73a27
+++ b/man/systemctl.xml
ca73a27
@@ -544,8 +544,7 @@ LISTEN           UNIT                        ACTIVATES
ca73a27
 [::]:22          sshd.socket                 sshd.service
ca73a27
 kobject-uevent 1 systemd-udevd-kernel.socket systemd-udevd.service
ca73a27
 
ca73a27
-5 sockets listed.
ca73a27
-            </programlisting>
ca73a27
+5 sockets listed.</programlisting>
ca73a27
             Note: because the addresses might contains spaces, this output
ca73a27
             is not suitable for programmatic consumption.
ca73a27
             </para>
ca73a27
diff --git a/man/systemd-delta.xml b/man/systemd-delta.xml
ca73a27
index ebaa349..f802aa5 100644
ca73a27
--- a/man/systemd-delta.xml
ca73a27
+++ b/man/systemd-delta.xml
ca73a27
@@ -204,20 +204,16 @@
ca73a27
 		<title>Examples</title>
ca73a27
 
ca73a27
 		<para>To see all local configuration:</para>
ca73a27
-		<programlisting>systemd-delta
ca73a27
-		</programlisting>
ca73a27
+		<programlisting>systemd-delta</programlisting>
ca73a27
 
ca73a27
 		<para>To see all runtime configuration:</para>
ca73a27
-		<programlisting>systemd-delta /run
ca73a27
-		</programlisting>
ca73a27
+		<programlisting>systemd-delta /run</programlisting>
ca73a27
 
ca73a27
 		<para>To see all system unit configuration changes:</para>
ca73a27
-		<programlisting>systemd-delta systemd/system
ca73a27
-		</programlisting>
ca73a27
+		<programlisting>systemd-delta systemd/system</programlisting>
ca73a27
 
ca73a27
 		<para>To see all runtime "drop-in" changes for system units:</para>
ca73a27
-		<programlisting>systemd-delta --type=extended /run/systemd/system
ca73a27
-		</programlisting>
ca73a27
+		<programlisting>systemd-delta --type=extended /run/systemd/system</programlisting>
ca73a27
 	</refsect1>
ca73a27
 
ca73a27
         <refsect1>
ca73a27
diff --git a/man/systemd-journal-gatewayd.service.xml b/man/systemd-journal-gatewayd.service.xml
ca73a27
index 0b6fd70..f639811 100644
ca73a27
--- a/man/systemd-journal-gatewayd.service.xml
ca73a27
+++ b/man/systemd-journal-gatewayd.service.xml
ca73a27
@@ -154,14 +154,12 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
ca73a27
         <listitem><para>Return a JSON structure describing the machine.</para>
ca73a27
 
ca73a27
         <para>Example:
ca73a27
-        <programlisting>
ca73a27
-{ "machine_id" : "8cf7ed9d451ea194b77a9f118f3dc446",
ca73a27
+        <programlisting>{ "machine_id" : "8cf7ed9d451ea194b77a9f118f3dc446",
ca73a27
   "boot_id" : "3d3c9efaf556496a9b04259ee35df7f7",
ca73a27
   "hostname" : "fedora",
ca73a27
   "os_pretty_name" : "Fedora 19 (Rawhide)",
ca73a27
   "virtualization" : "kvm",
ca73a27
-  ...}
ca73a27
-        </programlisting>
ca73a27
+  ...}</programlisting>
ca73a27
         </para>
ca73a27
         </listitem>
ca73a27
       </varlistentry>
ca73a27
@@ -295,16 +293,12 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
ca73a27
     in 
ca73a27
     url="http://www.freedesktop.org/wiki/Software/systemd/export">Journal
ca73a27
     Export Format</ulink>:
ca73a27
-    <programlisting>
ca73a27
-curl --silent -H'Accept: application/vnd.fdo.journal' \
ca73a27
-       'http://localhost:19531/entries?boot'
ca73a27
-    </programlisting>
ca73a27
+    <programlisting>curl --silent -H'Accept: application/vnd.fdo.journal' \
ca73a27
+       'http://localhost:19531/entries?boot'</programlisting>
ca73a27
     </para>
ca73a27
 
ca73a27
     <para>Listen for core dumps:
ca73a27
-    <programlisting>
ca73a27
-curl 'http://localhost:19531/entries?follow&MESSAGE_ID=fc2e22bc6ee647b6b90729ab34a250b1'
ca73a27
-    </programlisting></para>
ca73a27
+    <programlisting>curl 'http://localhost:19531/entries?follow&MESSAGE_ID=fc2e22bc6ee647b6b90729ab34a250b1'</programlisting></para>
ca73a27
   </refsect1>
ca73a27
 
ca73a27
   <refsect1>
ca73a27
diff --git a/man/systemd-run.xml b/man/systemd-run.xml
ca73a27
index 48a0715..97ddf44 100644
ca73a27
--- a/man/systemd-run.xml
ca73a27
+++ b/man/systemd-run.xml
ca73a27
@@ -209,8 +209,7 @@ Sep 08 07:37:21 bupkis systemd[1]: Starting /usr/bin/env...
ca73a27
 Sep 08 07:37:21 bupkis systemd[1]: Started /usr/bin/env.
ca73a27
 Sep 08 07:37:21 bupkis env[19948]: PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
ca73a27
 Sep 08 07:37:21 bupkis env[19948]: LANG=en_US.UTF-8
ca73a27
-Sep 08 07:37:21 bupkis env[19948]: BOOT_IMAGE=/vmlinuz-3.11.0-0.rc5.git6.2.fc20.x86_64
ca73a27
-    </programlisting>
ca73a27
+Sep 08 07:37:21 bupkis env[19948]: BOOT_IMAGE=/vmlinuz-3.11.0-0.rc5.git6.2.fc20.x86_64</programlisting>
ca73a27
   </refsect1>
ca73a27
 
ca73a27
   <refsect1>
ca73a27
diff --git a/man/systemd-sleep.conf.xml b/man/systemd-sleep.conf.xml
ca73a27
index dc4b0da..4622205 100644
ca73a27
--- a/man/systemd-sleep.conf.xml
ca73a27
+++ b/man/systemd-sleep.conf.xml
ca73a27
@@ -160,10 +160,8 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
ca73a27
     <para>Example: to exploit the <quote>freeze</quote> mode added
ca73a27
     in Linux 3.9, one can use <command>systemctl suspend</command>
ca73a27
     with
ca73a27
-    <programlisting>
ca73a27
-[Sleep]
ca73a27
-SuspendState=freeze
ca73a27
-    </programlisting></para>
ca73a27
+    <programlisting>[Sleep]
ca73a27
+SuspendState=freeze</programlisting></para>
ca73a27
   </refsect1>
ca73a27
 
ca73a27
   <refsect1>
ca73a27
diff --git a/man/systemd.service.xml b/man/systemd.service.xml
ca73a27
index 4fb21ba..e8bb02c 100644
ca73a27
--- a/man/systemd.service.xml
ca73a27
+++ b/man/systemd.service.xml
ca73a27
@@ -442,12 +442,9 @@
ca73a27
                                 be used, they need to be passed
ca73a27
                                 explicitly to a shell implementation
ca73a27
                                 of some kind. Example:</para>
ca73a27
-                                <programlisting>ExecStart=/bin/sh -c 'dmesg | tac'
ca73a27
-                                </programlisting>
ca73a27
-
ca73a27
+                                <programlisting>ExecStart=/bin/sh -c 'dmesg | tac'</programlisting>
ca73a27
                                 <para>Example:</para>
ca73a27
-                                <programlisting>ExecStart=/bin/echo one ; /bin/echo "two two"
ca73a27
-                                </programlisting>
ca73a27
+                                <programlisting>ExecStart=/bin/echo one ; /bin/echo "two two"</programlisting>
ca73a27
                                 <para>This will execute
ca73a27
                                 <command>/bin/echo</command> two
ca73a27
                                 times, each time with one argument,
ca73a27
@@ -460,8 +457,7 @@
ca73a27
 
ca73a27
                                 <para>Example:</para>
ca73a27
                                 <programlisting>ExecStart=/bin/echo / >/dev/null & \; \
ca73a27
-/bin/ls
ca73a27
-                                </programlisting>
ca73a27
+/bin/ls</programlisting>
ca73a27
                                 <para>This will execute
ca73a27
                                 <command>/bin/echo</command> with five
ca73a27
                                 arguments: <literal>/</literal>,
ca73a27
@@ -472,8 +468,7 @@
ca73a27
 
ca73a27
                                 <para>Example:</para>
ca73a27
                                 <programlisting>Environment="ONE=one" 'TWO=two two'
ca73a27
-ExecStart=/bin/echo $ONE $TWO ${TWO}
ca73a27
-                                </programlisting>
ca73a27
+ExecStart=/bin/echo $ONE $TWO ${TWO}</programlisting>
ca73a27
                                 <para>This will execute
ca73a27
                                 <command>/bin/echo</command> with four
ca73a27
                                 arguments: <literal>one</literal>,
ca73a27
diff --git a/man/timedatectl.xml b/man/timedatectl.xml
ca73a27
index f4975ce..5f95486 100644
ca73a27
--- a/man/timedatectl.xml
ca73a27
+++ b/man/timedatectl.xml
ca73a27
@@ -245,8 +245,7 @@
ca73a27
         <refsect1>
ca73a27
                 <title>Examples</title>
ca73a27
                 <para>Show current settings:
ca73a27
-                <programlisting>
ca73a27
-$ timedatectl
ca73a27
+                <programlisting>$ timedatectl
ca73a27
       Local time: Fri, 2012-11-02 09:26:46 CET
ca73a27
   Universal time: Fri, 2012-11-02 08:26:46 UTC
ca73a27
         RTC time: Fri, 2012-11-02 08:26:45
ca73a27
@@ -262,27 +261,22 @@ NTP synchronized: no
ca73a27
  Next DST change: CET → CEST, DST will become active
ca73a27
                   the clock will jump one hour forward
ca73a27
                   Sun, 2013-03-31 01:59:59 CET
ca73a27
-                  Sun, 2013-03-31 03:00:00 CEST
ca73a27
-                </programlisting>
ca73a27
+                  Sun, 2013-03-31 03:00:00 CEST</programlisting>
ca73a27
                 </para>
ca73a27
 
ca73a27
                 <para>Enable an NTP daemon (chronyd):
ca73a27
-                <programlisting>
ca73a27
-$ timedatectl set-ntp true
ca73a27
+                <programlisting>$ timedatectl set-ntp true
ca73a27
 ==== AUTHENTICATING FOR org.freedesktop.timedate1.set-ntp ===
ca73a27
 Authentication is required to control whether network time synchronization shall be enabled.
ca73a27
 Authenticating as: user
ca73a27
 Password: ********
ca73a27
-==== AUTHENTICATION COMPLETE ===
ca73a27
-                </programlisting>
ca73a27
+==== AUTHENTICATION COMPLETE ===</programlisting>
ca73a27
 
ca73a27
-                <programlisting>
ca73a27
-$ systemctl status chronyd.service
ca73a27
+                <programlisting>$ systemctl status chronyd.service
ca73a27
 chronyd.service - NTP client/server
ca73a27
           Loaded: loaded (/usr/lib/systemd/system/chronyd.service; enabled)
ca73a27
           Active: active (running) since Fri, 2012-11-02 09:36:25 CET; 5s ago
ca73a27
-...
ca73a27
-                </programlisting>
ca73a27
+...</programlisting>
ca73a27
                 </para>
ca73a27
         </refsect1>
ca73a27
 
ca73a27
diff --git a/man/tmpfiles.d.xml b/man/tmpfiles.d.xml
ca73a27
index 8267ffc..9578c93 100644
ca73a27
--- a/man/tmpfiles.d.xml
ca73a27
+++ b/man/tmpfiles.d.xml
ca73a27
@@ -109,7 +109,6 @@
ca73a27
 d    /run/user   0755 root root 10d -
ca73a27
 L    /tmp/foobar -    -    -    -   /dev/null</programlisting>
ca73a27
 
ca73a27
-
ca73a27
                 <refsect2>
ca73a27
                         <title>Type</title>
ca73a27
 
ca73a27
@@ -277,13 +276,11 @@ L    /tmp/foobar -    -    -    -   /dev/null</programlisting>
ca73a27
                         </para>
ca73a27
 
ca73a27
                         <para>For example:
ca73a27
-                        <programlisting>
ca73a27
-# Make sure these are created by default so that nobody else can
ca73a27
+                        <programlisting># Make sure these are created by default so that nobody else can
ca73a27
 d /tmp/.X11-unix 1777 root root 10d
ca73a27
 
ca73a27
 # Unlink the X11 lock files
ca73a27
-r! /tmp/.X[0-9]*-lock
ca73a27
-                        </programlisting>
ca73a27
+r! /tmp/.X[0-9]*-lock</programlisting>
ca73a27
                         The second line in contrast to the first one
ca73a27
                         would break a running system, and will only be
ca73a27
                         executed with <option>--boot</option>.</para>