man: generate configured paths in manpages
authorFilipe Brandenburger <filbranden@google.com>
Wed, 27 May 2015 09:38:19 +0000 (02:38 -0700)
committerLennart Poettering <lennart@poettering.net>
Thu, 28 May 2015 17:28:19 +0000 (19:28 +0200)
commit681eb9cf2b831293a4f3d4c48a748d2e4a25d69e
tree9293679b667f4d0dd0c525913b5d0ede61460550
parent5f529f4c97a141457301477505ae7eb4c28cf610
man: generate configured paths in manpages

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.
205 files changed:
man/binfmt.d.xml
man/bootchart.conf.xml
man/bootctl.xml
man/bootup.xml
man/busctl.xml
man/coredump.conf.xml
man/coredumpctl.xml
man/crypttab.xml
man/daemon.xml
man/file-hierarchy.xml
man/halt.xml
man/hostname.xml
man/hostnamectl.xml
man/hwdb.xml
man/journal-remote.conf.xml
man/journalctl.xml
man/journald.conf.xml
man/kernel-command-line.xml
man/kernel-install.xml
man/less-variables.xml
man/libsystemd-pkgconfig.xml
man/locale.conf.xml
man/localectl.xml
man/localtime.xml
man/loginctl.xml
man/logind.conf.xml
man/machine-id.xml
man/machine-info.xml
man/machinectl.xml
man/modules-load.d.xml
man/networkctl.xml
man/nss-myhostname.xml
man/nss-mymachines.xml
man/os-release.xml
man/pam_systemd.xml
man/resolved.conf.xml
man/runlevel.xml
man/sd-daemon.xml
man/sd-id128.xml
man/sd-journal.xml
man/sd-login.xml
man/sd_booted.xml
man/sd_bus_creds_get_pid.xml
man/sd_bus_creds_new_from_pid.xml
man/sd_bus_default.xml
man/sd_bus_error.xml
man/sd_bus_message_append.xml
man/sd_bus_message_append_array.xml
man/sd_bus_message_append_basic.xml
man/sd_bus_message_append_string_memfd.xml
man/sd_bus_message_append_strv.xml
man/sd_bus_message_get_cookie.xml
man/sd_bus_message_get_monotonic_usec.xml
man/sd_bus_negotiate_fds.xml
man/sd_bus_new.xml
man/sd_bus_path_encode.xml
man/sd_bus_request_name.xml
man/sd_event_add_child.xml
man/sd_event_add_defer.xml
man/sd_event_add_signal.xml
man/sd_event_add_time.xml
man/sd_event_get_fd.xml
man/sd_event_new.xml
man/sd_event_run.xml
man/sd_event_set_name.xml
man/sd_event_wait.xml
man/sd_get_seats.xml
man/sd_id128_get_machine.xml
man/sd_id128_randomize.xml
man/sd_id128_to_string.xml
man/sd_is_fifo.xml
man/sd_journal_add_match.xml
man/sd_journal_get_catalog.xml
man/sd_journal_get_cursor.xml
man/sd_journal_get_cutoff_realtime_usec.xml
man/sd_journal_get_data.xml
man/sd_journal_get_fd.xml
man/sd_journal_get_realtime_usec.xml
man/sd_journal_get_usage.xml
man/sd_journal_next.xml
man/sd_journal_open.xml
man/sd_journal_print.xml
man/sd_journal_query_unique.xml
man/sd_journal_seek_head.xml
man/sd_journal_stream_fd.xml
man/sd_listen_fds.xml
man/sd_login_monitor_new.xml
man/sd_machine_get_class.xml
man/sd_notify.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
man/sd_watchdog_enabled.xml
man/shutdown.xml
man/standard-conf.xml
man/standard-options.xml
man/sysctl.d.xml
man/systemctl.xml
man/systemd-activate.xml
man/systemd-analyze.xml
man/systemd-ask-password-console.service.xml
man/systemd-ask-password.xml
man/systemd-backlight@.service.xml
man/systemd-binfmt.service.xml
man/systemd-bootchart.xml
man/systemd-bus-proxyd.xml
man/systemd-bus-proxyd@.service.xml
man/systemd-cat.xml
man/systemd-cgls.xml
man/systemd-cgtop.xml
man/systemd-coredump.xml
man/systemd-cryptsetup-generator.xml
man/systemd-cryptsetup@.service.xml
man/systemd-debug-generator.xml
man/systemd-delta.xml
man/systemd-detect-virt.xml
man/systemd-efi-boot-generator.xml
man/systemd-escape.xml
man/systemd-firstboot.xml
man/systemd-fsck@.service.xml
man/systemd-fstab-generator.xml
man/systemd-getty-generator.xml
man/systemd-gpt-auto-generator.xml
man/systemd-halt.service.xml
man/systemd-hibernate-resume-generator.xml
man/systemd-hibernate-resume@.service.xml
man/systemd-hostnamed.service.xml
man/systemd-hwdb.xml
man/systemd-inhibit.xml
man/systemd-initctl.service.xml
man/systemd-journal-gatewayd.service.xml
man/systemd-journal-remote.xml
man/systemd-journal-upload.xml
man/systemd-journald.service.xml
man/systemd-localed.service.xml
man/systemd-logind.service.xml
man/systemd-machine-id-commit.service.xml
man/systemd-machine-id-commit.xml
man/systemd-machine-id-setup.xml
man/systemd-machined.service.xml
man/systemd-modules-load.service.xml
man/systemd-networkd-wait-online.service.xml
man/systemd-networkd.service.xml
man/systemd-notify.xml
man/systemd-nspawn.xml
man/systemd-path.xml
man/systemd-quotacheck.service.xml
man/systemd-random-seed.service.xml
man/systemd-remount-fs.service.xml
man/systemd-resolved.service.xml
man/systemd-rfkill@.service.xml
man/systemd-run.xml
man/systemd-sleep.conf.xml
man/systemd-socket-proxyd.xml
man/systemd-suspend.service.xml
man/systemd-sysctl.service.xml
man/systemd-system-update-generator.xml
man/systemd-system.conf.xml
man/systemd-sysusers.xml
man/systemd-sysv-generator.xml
man/systemd-timedated.service.xml
man/systemd-timesyncd.service.xml
man/systemd-tmpfiles.xml
man/systemd-tty-ask-password-agent.xml
man/systemd-udevd.service.xml
man/systemd-update-done.service.xml
man/systemd-update-utmp.service.xml
man/systemd-user-sessions.service.xml
man/systemd-vconsole-setup.service.xml
man/systemd.automount.xml
man/systemd.device.xml
man/systemd.exec.xml
man/systemd.generator.xml
man/systemd.journal-fields.xml
man/systemd.kill.xml
man/systemd.link.xml
man/systemd.mount.xml
man/systemd.netdev.xml
man/systemd.network.xml
man/systemd.path.xml
man/systemd.preset.xml
man/systemd.resource-control.xml
man/systemd.scope.xml
man/systemd.service.xml
man/systemd.slice.xml
man/systemd.snapshot.xml
man/systemd.socket.xml
man/systemd.special.xml
man/systemd.swap.xml
man/systemd.target.xml
man/systemd.time.xml
man/systemd.timer.xml
man/systemd.unit.xml
man/systemd.xml
man/sysusers.d.xml
man/telinit.xml
man/timedatectl.xml
man/timesyncd.conf.xml
man/tmpfiles.d.xml
man/udev.conf.xml
man/udev.xml
man/udevadm.xml
man/user-system-options.xml
man/vconsole.conf.xml