From a2095c06988499ee32e769de78663367495be33a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Sat, 13 Jun 2020 16:29:43 +0200 Subject: [PATCH 1/4] update-man-rules: properly filter out directives index again When directives-template.xml was created in 282230882cd0fc49b5377349f2aee22a1c9dd159, this generator started picking it up. Let's filter it out properly again, and also simply the filter while at it. --- tools/update-man-rules.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tools/update-man-rules.py b/tools/update-man-rules.py index c404579a2ad..f5db691f3ef 100755 --- a/tools/update-man-rules.py +++ b/tools/update-man-rules.py @@ -4,16 +4,13 @@ from __future__ import print_function import collections import sys -import os.path import pprint +from os.path import basename from xml_helper import xml_parse def man(page, number): return '{}.{}'.format(page, number) -def xml(file): - return os.path.basename(file) - def add_rules(rules, name): xml = xml_parse(name) # print('parsing {}'.format(name), file=sys.stderr) @@ -78,9 +75,12 @@ def make_mesonfile(rules, dist_files): if __name__ == '__main__': pages = sys.argv[1:] + pages = (p for p in pages + if basename(p) not in { + 'systemd.directives.xml', + 'systemd.index.xml', + 'directives-template.xml'}) rules = create_rules(pages) - dist_files = (xml(file) for file in pages - if not file.endswith(".directives.xml") and - not file.endswith(".index.xml")) + dist_files = (basename(p) for p in pages) print(make_mesonfile(rules, dist_files)) From 4f0ef40deb1ac77f25d1c7912faf578fa8f599de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Sat, 13 Jun 2020 16:44:58 +0200 Subject: [PATCH 2/4] man: drop obsolete HAVE_PYTHON conditional It stopped making sense when automake support was dropped and python started being required to perform a build. Follow-up for 72cdb3e783174dcf9223a49f03e3b0e2ca95ddb8. --- man/directives-template.xml | 2 +- tools/make-man-index.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/man/directives-template.xml b/man/directives-template.xml index 50380614673..e0063e051d6 100644 --- a/man/directives-template.xml +++ b/man/directives-template.xml @@ -1,6 +1,6 @@ - + systemd.directives systemd diff --git a/tools/make-man-index.py b/tools/make-man-index.py index 66027af02e5..4d206ca0b6b 100755 --- a/tools/make-man-index.py +++ b/tools/make-man-index.py @@ -9,7 +9,7 @@ from xml_helper import xml_parse, xml_print, tree MDASH = ' — ' if sys.version_info.major >= 3 else ' -- ' TEMPLATE = '''\ - + systemd.index From 4677c3da976d54d806ca5ced008f4917e88a0204 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Sat, 13 Jun 2020 16:45:37 +0200 Subject: [PATCH 3/4] man: really fix conditional in homed.conf Followup for f978844eb62e1c47431b388ab90aafdd29f624ec. --- man/rules/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/rules/meson.build b/man/rules/meson.build index b04ae1c67c4..e8dcfd7bffd 100644 --- a/man/rules/meson.build +++ b/man/rules/meson.build @@ -18,7 +18,7 @@ manpages = [ ['file-hierarchy', '7', [], ''], ['halt', '8', ['poweroff', 'reboot'], ''], ['homectl', '1', [], 'ENABLE_HOMED'], - ['homed.conf', '5', ['homed.conf.d'], 'ENABLE_RESOLVE'], + ['homed.conf', '5', ['homed.conf.d'], 'ENABLE_HOMED'], ['hostname', '5', [], ''], ['hostnamectl', '1', [], 'ENABLE_HOSTNAMED'], ['hwdb', '7', [], 'ENABLE_HWDB'], From 387536b3a922879852021458b1d84791112dedd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Sat, 13 Jun 2020 17:11:00 +0200 Subject: [PATCH 4/4] man: mention systemd-user-runtime-dir in user@.service too _riotingpacifist was complaining on reddit [1] that systemd-user-runtime-dir is not documented anywhere. So let's add the binary name as page alias. [1] https://www.reddit.com/r/linux/comments/h086fd/why_linuxs_systemd_is_still_divisive_after_all/ftllr66/ This page should be in section 8, like all .service descriptions. Also extend the text a bit to make it clearer that systemd --user is the same executable but running in a different mode (which might be certainly a bit confusing to users.) --- man/rules/meson.build | 5 ++++- man/user@.service.xml | 27 +++++++++++++++------------ 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/man/rules/meson.build b/man/rules/meson.build index e8dcfd7bffd..e6083004ea1 100644 --- a/man/rules/meson.build +++ b/man/rules/meson.build @@ -1096,7 +1096,10 @@ manpages = [ ''], ['udev_new', '3', ['udev_ref', 'udev_unref'], ''], ['udevadm', '8', [], ''], - ['user@.service', '5', ['user-runtime-dir@.service'], ''], + ['user@.service', + '5', + ['systemd-user-runtime-dir', 'user-runtime-dir@.service'], + ''], ['userdbctl', '1', [], 'ENABLE_USERDB'], ['vconsole.conf', '5', [], 'ENABLE_VCONSOLE'] ] diff --git a/man/user@.service.xml b/man/user@.service.xml index f4603df0739..cb95d043928 100644 --- a/man/user@.service.xml +++ b/man/user@.service.xml @@ -17,34 +17,37 @@ user@.service user-runtime-dir@.service - System units to manage user processes + systemd-user-runtime-dir + System units to start the user manager user@UID.service user-runtime-dir@UID.service + /usr/lib/systemd/systemd-user-runtime-dir user-UID.slice Description - The - systemd1 + The systemd1 system manager (PID 1) starts user manager instances as - user@UID.service, where the user's numerical UID - is used as the instance identifier. Each systemd --user instance manages a - hierarchy of its own units. See - systemd1 for - a discussion of systemd units and - systemd.special1 - for a list of units that form the basis of the unit hierarchies of system and user units. + user@UID.service, with the user's numerical UID used as + the instance identifier. These instances use the same executable as the system manager, but running in a + mode where it starts a different set of units. Each systemd --user instance manages a + hierarchy of units specific to that user. See + systemd1 for a + discussion of units and + systemd.special1 for a + list of units that form the basis of the unit hierarchies of system and user units. user@UID.service is accompanied by the system unit user-runtime-dir@UID.service, which creates the user's runtime directory /run/user/UID, and then removes it when this - unit is stopped. + unit is stopped. user-runtime-dir@UID.service + executes the systemd-user-runtime-dir binary to do the actual work. User processes may be started by the user@.service instance, in which case they will be part of that unit in the system hierarchy. They may also be started elsewhere, @@ -53,7 +56,7 @@ display manager like gdm, in which case they form a .scope unit (see systemd.scope5). Both user@UID.service and the scope units are - collected under a user-UID.slice. + collected under the user-UID.slice. Individual user-UID.slice slices are collected under user.slice, see