From 681eb9cf2b831293a4f3d4c48a748d2e4a25d69e Mon Sep 17 00:00:00 2001 From: Filipe Brandenburger Date: Wed, 27 May 2015 02:38:19 -0700 Subject: 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. --- man/systemd.unit.xml | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'man/systemd.unit.xml') diff --git a/man/systemd.unit.xml b/man/systemd.unit.xml index 0aa1eeac77..8286cf3f78 100644 --- a/man/systemd.unit.xml +++ b/man/systemd.unit.xml @@ -64,20 +64,20 @@ slice.slice, scope.scope - /etc/systemd/system/* + &pkgsysconfdir;/system/* /run/systemd/system/* -/usr/lib/systemd/system/* +&rootlibexecdir;/system/* ... $XDG_CONFIG_HOME/systemd/user/* $HOME/.config/systemd/user/* -/etc/systemd/user/* +&pkgsysconfdir;/user/* $XDG_RUNTIME_DIR/systemd/user/* /run/systemd/user/* $XDG_DATA_HOME/systemd/user/* $HOME/.local/share/systemd/user/* -/usr/lib/systemd/user/* +&rootlibexecdir;/user/* ... @@ -287,7 +287,7 @@ - /etc/systemd/system + &pkgsysconfdir;/system Local configuration @@ -295,7 +295,7 @@ Runtime units - /usr/lib/systemd/system + &rootlibexecdir;/system Units of installed packages @@ -326,7 +326,7 @@ User configuration (only used when $XDG_CONFIG_HOME is not set) - /etc/systemd/user + &pkgsysconfdir;/user Local configuration @@ -346,7 +346,7 @@ Units of packages that have been installed in the home directory (only used when $XDG_DATA_HOME is not set) - /usr/lib/systemd/user + &rootlibexecdir;/user Units of packages that have been installed system-wide @@ -1296,7 +1296,7 @@ ExecStart=/usr/sbin/foo-daemon After running systemctl enable, a symlink - /etc/systemd/system/multi-user.target.wants/foo.service + &pkgsysconfdir;/system/multi-user.target.wants/foo.service linking to the actual unit will be created. It tells systemd to pull in the unit when starting multi-user.target. The inverse @@ -1309,11 +1309,11 @@ ExecStart=/usr/sbin/foo-daemon There are two methods of overriding vendor settings in unit files: copying the unit file from - /usr/lib/systemd/system to - /etc/systemd/system and modifying the + &rootlibexecdir;/system to + &pkgsysconfdir;/system and modifying the chosen settings. Alternatively, one can create a directory named unit.d/ within - /etc/systemd/system and place a drop-in + &pkgsysconfdir;/system and place a drop-in file name.conf there that only changes the specific settings one is interested in. Note that multiple such drop-in files are read if @@ -1343,7 +1343,7 @@ ExecStart=/usr/sbin/foo-daemon load paths for further details. Suppose there is a vendor-supplied unit - /usr/lib/systemd/system/httpd.service with + &rootlibexecdir;/system/httpd.service with the following contents: [Unit] @@ -1375,7 +1375,7 @@ WantedBy=multi-user.target the niceness of the service to its default value of 0. The first possibility is to copy the unit file to - /etc/systemd/system/httpd.service and + &pkgsysconfdir;/system/httpd.service and change the chosen settings: [Unit] @@ -1395,7 +1395,7 @@ WantedBy=multi-user.target Alternatively, the administrator could create a drop-in file - /etc/systemd/system/httpd.service.d/local.conf + &pkgsysconfdir;/system/httpd.service.d/local.conf with the following contents: [Unit] -- cgit v1.2.3-54-g00ecf