From a1174b226029e693b912dc5efa9172afe230423f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Mon, 1 Mar 2021 13:51:46 +0100 Subject: [PATCH 1/4] man: update link to systemd-coredump-python This got moved under the systemd umbrella a long time ago. Github redirects from the old path, so the link worked, but it's nicer to use the real location. --- man/systemd-coredump.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/systemd-coredump.xml b/man/systemd-coredump.xml index aea1cf861f..7361281e06 100644 --- a/man/systemd-coredump.xml +++ b/man/systemd-coredump.xml @@ -115,7 +115,7 @@ handler must be installed on the sender side. For example, in case of python1, this means a sys.excepthook must be installed, see - systemd-coredump-python. + systemd-coredump-python. The behavior of systemd-coredump itself is configured through the configuration file From 40019c32d72f94e22cfc1cc579485c49ad5ee148 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Mon, 1 Mar 2021 20:30:40 +0100 Subject: [PATCH 2/4] man: clarify what is inside/outside the container in coredump info --- man/systemd-coredump.xml | 41 +++++++++++++++++++++++++++++++++++----- 1 file changed, 36 insertions(+), 5 deletions(-) diff --git a/man/systemd-coredump.xml b/man/systemd-coredump.xml index 7361281e06..8ddb8ef3ca 100644 --- a/man/systemd-coredump.xml +++ b/man/systemd-coredump.xml @@ -178,7 +178,12 @@ COREDUMP_FILENAME=/var/lib/systemd/coredump/core.Web….552351.….zst COREDUMP_UID= COREDUMP_PID= COREDUMP_GID= - The process number (PID) and owner (UID and GID) of the crashed process. + The process number (PID), owner user number (UID), and group number (GID) of the + crashed process. + + When the crashed process was part of a container (or in a process or user namespace in + general), those are the values as seen outside, in the namespace where + systemd-coredump is running. @@ -199,6 +204,9 @@ COREDUMP_FILENAME=/var/lib/systemd/coredump/core.Web….552351.….zst COREDUMP_UNIT= COREDUMP_SLICE= The system unit and slice names. + + When the crashed process was in container, those are the units names + outside, in the main system manager. @@ -207,7 +215,11 @@ COREDUMP_FILENAME=/var/lib/systemd/coredump/core.Web….552351.….zst Control group information in the format used in /proc/self/cgroup. On systems with the unified cgroup hierarchy, this is a single path prefixed with 0::, and multiple paths prefixed with controller numbers - on legacy systems. + on legacy systems. + + When the crashed process was in a container, this is the full path, as seen outside of the + container. + @@ -215,7 +227,11 @@ COREDUMP_FILENAME=/var/lib/systemd/coredump/core.Web….552351.….zst COREDUMP_USER_UNIT= The numerical UID of the user owning the login session or systemd user unit of the crashed process, and the user manager unit. Both fields are only present for user processes. - + + + When the crashed process was in container, those are the values outside, + in the main system. + @@ -232,6 +248,9 @@ COREDUMP_FILENAME=/var/lib/systemd/coredump/core.Web….552351.….zst COREDUMP_ROOT= The current working directory and root directory of the crashed process. + + When the crashed process is in a container, those paths are relative to the root of the + container's mount namespace. @@ -257,8 +276,17 @@ flags: ... - COREDUMP_COMM= COREDUMP_EXE= + + The destination of the /proc/pid/exe + symlink. + + When the crashed process is in a container, that path is relative to the root of the + container's mount namespace. + + + + COREDUMP_COMM= COREDUMP_PROC_STATUS= COREDUMP_PROC_MAPS= COREDUMP_PROC_LIMITS= @@ -284,7 +312,10 @@ flags: ... COREDUMP_HOSTNAME= - The system hostname. + The system hostname. + + When the crashed process was in container, this is the container hostname. + From 07dc08c2692a4503cc95e89138c9dfbd9d9c3060 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Mon, 1 Mar 2021 20:42:33 +0100 Subject: [PATCH 3/4] man: move two sysv-specific variables to docs https://github.com/systemd/systemd/pull/18827#discussion_r584807684 --- docs/ENVIRONMENT.md | 10 +++++++++- man/systemd-sysv-generator.xml | 14 -------------- man/systemd.xml | 7 ------- 3 files changed, 9 insertions(+), 22 deletions(-) diff --git a/docs/ENVIRONMENT.md b/docs/ENVIRONMENT.md index a3916f8cde..ab10a4fc7e 100644 --- a/docs/ENVIRONMENT.md +++ b/docs/ENVIRONMENT.md @@ -288,8 +288,16 @@ installed systemd tests: `systemd-tmpfiles`: -* `SYSTEMD_TMPFILES_FORCE_SUBVOL` - if unset, `v`/`q`/`Q` lines will create +* `SYSTEMD_TMPFILES_FORCE_SUBVOL` — if unset, `v`/`q`/`Q` lines will create subvolumes only if the OS itself is installed into a subvolume. If set to `1` (or another value interpreted as true), these lines will always create subvolumes if the backing filesystem supports them. If set to `0`, these lines will always create directories. + +`systemd-sysv-generator`: + +* `$SYSTEMD_SYSVINIT_PATH` — Controls where `systemd-sysv-generator` looks for + SysV init scripts. + +* `$SYSTEMD_SYSVRCND_PATH` — Controls where `systemd-sysv-generator` looks for + SysV init script runlevel link farms. diff --git a/man/systemd-sysv-generator.xml b/man/systemd-sysv-generator.xml index aafd332132..14ab932fed 100644 --- a/man/systemd-sysv-generator.xml +++ b/man/systemd-sysv-generator.xml @@ -60,20 +60,6 @@ systemd.generator7. - - Environment - - Special variables understood by systemd-sysv-generator: - - - - $SYSTEMD_SYSVINIT_PATH - - Controls where systemd looks for SysV init scripts. - - - - See Also diff --git a/man/systemd.xml b/man/systemd.xml index 27f0a7517d..c60f220f31 100644 --- a/man/systemd.xml +++ b/man/systemd.xml @@ -696,13 +696,6 @@ - - $SYSTEMD_SYSVRCND_PATH - - Controls where systemd looks for SysV init - script runlevel link farms. - - From 1447d87a47db0d0c522e633b45c495635e8e7606 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Mon, 1 Mar 2021 20:53:22 +0100 Subject: [PATCH 4/4] man: document \u and \U, say that utf-8 is allowed --- man/systemd.syntax.xml | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/man/systemd.syntax.xml b/man/systemd.syntax.xml index 5f207912b9..e900747ae7 100644 --- a/man/systemd.syntax.xml +++ b/man/systemd.syntax.xml @@ -136,14 +136,14 @@ KeyThree=value 3\ single quotes ('…') may be used to wrap a whole item (the opening quote may appear only at the beginning or after whitespace that is not quoted, and the closing quote must be followed by whitespace or the end of line), in which case everything until the next matching quote becomes part of the same item. Quotes - themselves are removed. C-style escapes are also supported. The table below contains the list of known - escape patterns. Only escape patterns which match the syntax in the table are allowed; other patterns may - be added in the future and unknown patterns will result in a warning. In particular, any backslashes - should be doubled. Finally, a trailing backslash (\) may be used to merge lines, as - described above. + themselves are removed. C-style escapes are supported. The table below contains the list of known escape + patterns. Only escape patterns which match the syntax in the table are allowed; other patterns may be + added in the future and unknown patterns will result in a warning. In particular, any backslashes should + be doubled. Finally, a trailing backslash (\) may be used to merge lines, as described + above. UTF-8 is accepted, and hence typical unicode characters do not need to be escaped. - Supported C escapes + Supported escapes @@ -206,6 +206,14 @@ KeyThree=value 3\ \nnn character number nnn in octal encoding + + \unnnn + unicode code point nnnn in hexadecimal encoding + + + \Unnnnnnnn + unicode code point nnnnnnnn in hexadecimal encoding +