Package: rsyslog Version: 8.2502.0-1 Severity: minor Tags: patch Preface.
I do not have an account at upstream and do not intend to create one. My patch is not a commit. I don't engage in pull requests (too complicated for me). I do not have a repository of the source. I suggest forwarding. -.- * What led up to the situation? Checking for defects with a new version test-[g|n]roff -mandoc -t -K utf8 -rF0 -rHY=0 -rCHECKSTYLE=10 -ww -z < "man page" [Use "groff -e ' $' -e '\\~$' <file>" to find obvious trailing spaces.] ["test-groff" is a script in the repository for "groff"; is not shipped] (local copy and "troff" slightly changed by me). [The fate of "test-nroff" was decided in groff bug #55941.] * What was the outcome of this action? troff:<stdin>:6: warning: trailing space in the line troff:<stdin>:11: warning: trailing space in the line troff:<stdin>:14: warning: trailing space in the line troff:<stdin>:18: warning: trailing space in the line troff:<stdin>:21: warning: trailing space in the line troff:<stdin>:75: warning: trailing space in the line an.tmac:<stdin>:128: misuse, warning: .BI is for at least 2 arguments, got 1 Use macro '.B' for one argument or split argument. an.tmac:<stdin>:219: style: use of deprecated macro: .PD troff:<stdin>:232: warning: trailing space in the line an.tmac:<stdin>:289: style: use of deprecated macro: .PD an.tmac:<stdin>:295: misuse, warning: .BR is for at least 2 arguments, got 1 Use macro '.B' for one argument or split argument. an.tmac:<stdin>:311: style: use of deprecated macro: .PD an.tmac:<stdin>:320: style: use of deprecated macro: .PD * What outcome did you expect instead? No output (no warnings). -.- General remarks and further material, if a diff-file exist, are in the attachments. -- System Information: Debian Release: trixie/sid APT prefers testing APT policy: (500, 'testing') Architecture: amd64 (x86_64) Kernel: Linux 6.12.12-amd64 (SMP w/2 CPU threads; PREEMPT) Locale: LANG=is_IS.iso88591, LC_CTYPE=is_IS.iso88591 (charmap=ISO-8859-1), LANGUAGE not set Shell: /bin/sh linked to /usr/bin/dash Init: sysvinit (via /sbin/init) Versions of packages rsyslog depends on: ii libc6 2.40-7 ii libestr0 0.1.11-1+b2 ii libfastjson4 1.2304.0-2 ii liblognorm5 2.0.6-4+b3 ii libsystemd0 257.3-1 ii libuuid1 2.40.4-4 ii libzstd1 1.5.6+dfsg-2 ii zlib1g 1:1.3.dfsg+really1.3.1-1+b1 Versions of packages rsyslog recommends: ii logrotate 3.22.0-1 Versions of packages rsyslog suggests: ii rsyslog-doc 8.2502.0+dfsg-1 pn rsyslog-gssapi <none> pn rsyslog-mongodb <none> pn rsyslog-mysql | rsyslog-pgsql <none> pn rsyslog-openssl | rsyslog-gnutls <none> pn rsyslog-relp <none> -- no debconf information
Input file is rsyslogd.8 Output from "mandoc -T lint rsyslogd.8": (shortened list) 7 skipping paragraph macro: PP empty 3 whitespace at end of input line Remove trailing space with: sed -e 's/ *$//' -.-. Output from "test-groff -mandoc -t -ww -z rsyslogd.8": (shortened list) 2 Use macro '.B' for one argument or split argument. 1 .BI is for at least 2 arguments, got 1 1 .BR is for at least 2 arguments, got 1 7 trailing space in the line -.-. Remove space characters (whitespace) at the end of lines. Use "git apply ... --whitespace=fix" to fix extra space issues, or use global configuration "core.whitespace". Number of lines affected is 3 -.-. Use the correct macro for the font change of a single argument or split the argument into two. 128:.BI "\-C" -.-. Change a HYPHEN-MINUS (code 0x2D) to a minus(-dash) (\-), if it is in front of a name for an option, is a symbol for standard input, is a single character used to indicate an option, or is in the NAME section (man-pages(7)). N.B. - (0x2D), processed as a UTF-8 file, is changed to a hyphen (0x2010, groff \[u2010] or \[hy]) in the output. 101:the reserved name "NONE" (all upper case!), so "-iNONE". 113:interactively in foreground, specifying -f <config-file> and -N level. 115:not specifying the -N option at all (so this makes limited sense) and 143:kill -SIGNAL $(cat /var/run/rsyslogd.pid) 146:Note that -SIGNAL must be replaced with the actual signal 150:kill -HUP $(cat /var/run/rsyslogd.pid) 250:in the startup than command line options (i.e. -d) and as such 278:Display a very short list of commands - hopefully a life saver if -.-. Add a "\&" (or a comma (Oxford comma)) after "e.g." and "i.e.", or use English words (man-pages(7)). Abbreviation points should be marked as such and protected against being interpreted as an end of sentence, if they are not, and that independent of the current place on the line. 147:you are trying to send, e.g. with HUP. So it then becomes: 240:is specified during compilation (e.g. /usr/local). 250:in the startup than command line options (i.e. -d) and as such 261:times, one file each (e.g. export RSYSLOG_DEBUG="LogFuncFlow 265:information is printed (e.g. abort case)! -.-. Wrong distance between sentences in the input file. Separate the sentences and subordinate clauses; each begins on a new line. See man-pages(7) ("Conventions for source file layout") and "info groff" ("Input Conventions"). The best procedure is to always start a new sentence on a new line, at least, if you are typing on a computer. Remember coding: Only one command ("sentence") on each (logical) line. E-mail: Easier to quote exactly the relevant lines. Generally: Easier to edit the sentence. Patches: Less unaffected text. Search for two adjacent words is easier, when they belong to the same line, and the same phrase. The amount of space between sentences in the output can then be controlled with the ".ss" request. Mark a final abbreviation point as such by suffixing it with "\&". Some sentences (etc.) do not begin on a new line. Split (sometimes) lines after a punctuation mark; before a conjunction. N.B. The number of lines affected can be too large to be in a patch. Lines with only one (or two) space(s) between sentences could be split, so latter sentences begin on a new line. Use #!/usr/bin/sh sed -e '/^\./n' \ -e 's/\([[:alpha:]]\)\. */\1.\n/g' $1 to split lines after a sentence period. Check result with the difference between the formatted outputs. See also the attachment "general.bugs" [List of affected lines removed.] -.- Split lines longer than 80 characters into two or more lines. Appropriate break points are the end of a sentence and a subordinate clause; after punctuation marks. Add "\:" to split the string for the output, "\<newline>" in the source. Line 34, length 87 .B Note that this version of rsyslog ships with extensive documentation in HTML format. Line 193, length 88 \fBALSO NOTE\fP that this will prevent usage of remote logging on the default port since -.-. Use \(en (en-dash) for a dash at the beginning (en) of a line, or between space characters, not a minus (\-) or a hyphen (-), except in the NAME section. rsyslogd.8:278:Display a very short list of commands - hopefully a life saver if -.-. Put a parenthetical sentence, phrase on a separate line, if not part of a code. See man-pages(7), item "semantic newline". rsyslogd.8:101:the reserved name "NONE" (all upper case!), so "-iNONE". rsyslogd.8:115:not specifying the -N option at all (so this makes limited sense) and rsyslogd.8:117:verbosity (this is a forward-compatibility option). rsyslogd.8:240:is specified during compilation (e.g. /usr/local). rsyslogd.8:245:following options possible (all are case insensitive): rsyslogd.8:250:in the startup than command line options (i.e. -d) and as such rsyslogd.8:256:Print out the logical flow of functions (entering and exiting them) rsyslogd.8:265:information is printed (e.g. abort case)! rsyslogd.8:273:Do not prefix log lines with a timestamp (default is to do that). -.-. No space is needed before a quote (") at the end of a macro line 11:.RB [ " \-f " 14:.RB [ " \-i " 18:.RB [ " \-N " 21:.RB [ " \-o " -.-. Remove quotes when there is a printable but no space character between them and the quotes are not for emphasis (markup), for example as an argument to a macro. 76:.B "\-f" 84:.B "\-D" 89:.B "\-d" 94:.IR /etc/rsyslog.conf "," 103:.B "\-n" 109:.B "\-N " "level" 119:.B "\-o " "fullconf" 128:.BI "\-C" 133:.B "\-v" 167:.B "\-d" 208:.B "\-d" -.-. Output from "test-groff -mandoc -t -K utf8 -rF0 -rHY=0 -rCHECKSTYLE=10 -ww -z ": troff:<stdin>:6: warning: trailing space in the line troff:<stdin>:11: warning: trailing space in the line troff:<stdin>:14: warning: trailing space in the line troff:<stdin>:18: warning: trailing space in the line troff:<stdin>:21: warning: trailing space in the line troff:<stdin>:75: warning: trailing space in the line an.tmac:<stdin>:128: misuse, warning: .BI is for at least 2 arguments, got 1 Use macro '.B' for one argument or split argument. an.tmac:<stdin>:219: style: use of deprecated macro: .PD troff:<stdin>:232: warning: trailing space in the line an.tmac:<stdin>:289: style: use of deprecated macro: .PD an.tmac:<stdin>:295: misuse, warning: .BR is for at least 2 arguments, got 1 Use macro '.B' for one argument or split argument. an.tmac:<stdin>:311: style: use of deprecated macro: .PD an.tmac:<stdin>:320: style: use of deprecated macro: .PD -.-. Generally: Split (sometimes) lines after a punctuation mark; before a conjunction.
--- rsyslogd.8 2025-02-27 11:47:41.696591574 +0000 +++ rsyslogd.8.new 2025-02-27 12:45:45.168582780 +0000 @@ -3,27 +3,26 @@ .\" .TH RSYSLOGD 8 "28 May 2014" "Version 8.1905.0" "Linux System Administration" .SH NAME -rsyslogd \- reliable and extended syslogd +rsyslogd \- reliable and extended syslogd .SH SYNOPSIS .B rsyslogd .RB [ " \-d " ] .RB [ " \-D " ] -.RB [ " \-f " +.RB [ " \-f" .I config file ] -.RB [ " \-i " +.RB [ " \-i" .I pid file ] .RB [ " \-n " ] -.RB [ " \-N " +.RB [ " \-N" .I level ] -.RB [ " \-o " +.RB [ " \-o" .I fullconf ] .RB [ " \-C " ] .RB [ " \-v " ] -.LP .SH DESCRIPTION .B Rsyslogd is a system utility providing support for message logging. @@ -31,7 +30,8 @@ Support of both internet and unix domain sockets enables this utility to support both local and remote logging. -.B Note that this version of rsyslog ships with extensive documentation in HTML format. +.B Note that this version of rsyslog ships with extensive documentation in \ +HTML format. This is provided in the ./doc subdirectory and probably in a separate package if you installed rsyslog via a packaging system. To use rsyslog's advanced features, you @@ -72,51 +72,50 @@ anomalous behavior. The main configuration file .I /etc/rsyslog.conf -or an alternative file, given with the -.B "\-f" +or an alternative file, given with the +.B \-f option, is read at startup. Any lines that begin with the hash mark (``#'') and empty lines are ignored. If an error occurs during parsing the error element is ignored. It is tried to parse the rest of the line. -.LP .SH OPTIONS .TP -.B "\-D" +.B \-D Runs the Bison config parser in debug mode. This may help when hard to find syntax errors are reported. Please note that the output generated is deeply technical and originally targeted towards developers. .TP -.B "\-d" +.B \-d Turns on debug mode. See the DEBUGGING section for more information. .TP .BI "\-f " "config file" Specify an alternative configuration file instead of -.IR /etc/rsyslog.conf "," +.IR /etc/rsyslog.conf , which is the default. .TP .BI "\-i " "pid file" Specify an alternative pid file instead of the default one. This option must be used if multiple instances of rsyslogd should run on a single machine. To disable writing a pid file, use -the reserved name "NONE" (all upper case!), so "-iNONE". +the reserved name "NONE" (all upper case!), so "\-iNONE". .TP -.B "\-n" +.B \-n Avoid auto-backgrounding. This is needed especially if the .B rsyslogd is started and controlled by .BR init (8). .TP -.B "\-N " "level" +.B \-N level Do a config check. Do NOT run in regular mode, just check configuration file correctness. This option is meant to verify a config file. To do so, run rsyslogd -interactively in foreground, specifying -f <config-file> and -N level. +interactively in foreground, specifying \-f <config-file> and \-N level. The level argument modifies behaviour. Currently, 0 is the same as -not specifying the -N option at all (so this makes limited sense) and +not specifying the \-N option at all (so this makes limited sense) and 1 actually activates the code. Later, higher levels will mean more verbosity (this is a forward-compatibility option). .TP -.B "\-o " "fullconf" +.B \-o fullconf Generates a consolidated config file .I fullconf that contains all of rsyslog's configuration in a single file. Include @@ -125,14 +124,13 @@ This option is useful for troubleshootin the order of action processing is suspected. It may also be used to check for "unexepectedly" included config content. .TP -.BI "\-C" +.B \-C This prevents rsyslogd from changing to the root directory. This is almost never a good idea in production use. This option was introduced in support of the internal testbed. .TP -.B "\-v" +.B \-v Print version and exit. -.LP .SH SIGNALS .B Rsyslogd reacts to a set of signals. You may easily send a signal to @@ -140,23 +138,22 @@ reacts to a set of signals. You may eas using the following: .IP .nf -kill -SIGNAL $(cat /var/run/rsyslogd.pid) +kill \-SIGNAL $(cat /var/run/rsyslogd.pid) .fi .PP -Note that -SIGNAL must be replaced with the actual signal -you are trying to send, e.g. with HUP. So it then becomes: +Note that \-SIGNAL must be replaced with the actual signal +you are trying to send, e.g.\& with HUP. So it then becomes: .IP .nf -kill -HUP $(cat /var/run/rsyslogd.pid) +kill \-HUP $(cat /var/run/rsyslogd.pid) .fi -.PP .TP .B HUP This lets .B rsyslogd perform close all open files. .TP -.B TERM ", " INT ", " QUIT +.BR TERM ", " INT ", " QUIT .B Rsyslogd will die. .TP @@ -164,12 +161,11 @@ will die. Switch debugging on/off. This option can only be used if .B rsyslogd is started with the -.B "\-d" +.B \-d debug option. .TP .B CHLD Wait for children if some were born, because of wall'ing messages. -.LP .SH SECURITY THREATS There is the potential for the rsyslogd daemon to be used as a conduit for a denial of service attack. @@ -190,7 +186,8 @@ if filled, will not impair the machine. The ext2 filesystem can be used which can be configured to limit a certain percentage of a filesystem to usage by root only. \fBNOTE\fP that this will require rsyslogd to be run as a non-root process. -\fBALSO NOTE\fP that this will prevent usage of remote logging on the default port since +\fBALSO NOTE\fP that this will prevent usage of remote logging on the +default port since rsyslogd will be unable to bind to the 514/UDP socket. .IP 4. Disabling inet domain sockets will limit risk to the local machine. @@ -202,10 +199,9 @@ attacker might replay recorded messages which could lead to a wrong perception of system activity. These can be prevented by using GSS-API authentication and encryption. Be sure to think about syslog network security before enabling it. -.LP .SH DEBUGGING When debugging is turned on using the -.B "\-d" +.B \-d option, .B rsyslogd produces debugging information according to the @@ -229,7 +225,7 @@ for exact information. The Unix domain socket to from where local syslog messages are read. .TP .I /var/run/rsyslogd.pid -The file containing the process id of +The file containing the process id of .BR rsyslogd . .TP .I prefix/lib/rsyslog @@ -237,7 +233,7 @@ Default directory for .B rsyslogd modules. The .I prefix -is specified during compilation (e.g. /usr/local). +is specified during compilation (e.g.\& /usr/local). .SH ENVIRONMENT .TP .B RSYSLOG_DEBUG @@ -247,7 +243,7 @@ following options possible (all are case .RS .IP Debug Turns on debugging and prevents forking. This is processed earlier -in the startup than command line options (i.e. -d) and as such +in the startup than command line options (i.e.\& \-d) and as such enables earlier debugging output. Mutually exclusive with DebugOnDemand. .IP DebugOnDemand Enables debugging but turns off debug output. The output can be toggled @@ -258,11 +254,11 @@ Print out the logical flow of functions Specifies which files to trace LogFuncFlow. If not set (the default), a LogFuncFlow trace is provided for all files. Set to limit it to the files specified.FileTrace may be specified multiple -times, one file each (e.g. export RSYSLOG_DEBUG="LogFuncFlow +times, one file each (e.g.\& export RSYSLOG_DEBUG="LogFuncFlow FileTrace=vm.c FileTrace=expr.c" .IP PrintFuncDB Print the content of the debug function database whenever debug -information is printed (e.g. abort case)! +information is printed (e.g.\& abort case)! .IP PrintAllDebugInfoOnExit Print all debug information immediately before rsyslogd exits (currently not implemented!) @@ -275,7 +271,7 @@ Do not prefix log lines with a timestamp Do not emit debug messages to stdout. If RSYSLOG_DEBUGLOG is not set, this means no messages will be displayed at all. .IP Help -Display a very short list of commands - hopefully a life saver if +Display a very short list of commands \(en hopefully a life saver if you can't access the documentation... .RE @@ -292,7 +288,7 @@ Please review the file BUGS for up-to-da bugs and annoyances. .SH Further Information Please visit -.BR https://www.rsyslog.com/doc/ +.B https://www.rsyslog.com/doc/ for additional information, tutorials and a support forum. .SH SEE ALSO .BR rsyslog.conf (5), @@ -301,7 +297,6 @@ for additional information, tutorials an .BR syslog (3), .BR services (5), .BR savelog (8) -.LP .SH COLLABORATORS .B rsyslogd is derived from sysklogd sources, which in turn was taken from
Any program (person), that produces man pages, should check the output for defects by using (both groff and nroff) [gn]roff -mandoc -t -ww -b -z -K utf8 <man page> The same goes for man pages that are used as an input. For a style guide use mandoc -T lint -.- Any "autogenerator" should check its products with the above mentioned 'groff', 'mandoc', and additionally with 'nroff ...'. It should also check its input files for too long (> 80) lines. This is just a simple quality control measure. The "autogenerator" may have to be corrected to get a better man page, the source file may, and any additional file may. Common defects: Not removing trailing spaces (in in- and output). The reason for these trailing spaces should be found and eliminated. "git" has a "tool" to point out whitespace, see for example "git-apply(1)" and git-config(1)") Not beginning each input sentence on a new line. Line length and patch size should thus be reduced. The script "reportbug" uses 'quoted-printable' encoding when a line is longer than 1024 characters in an 'ascii' file. See man-pages(7), item "semantic newline". -.- The difference between the formatted output of the original and patched file can be seen with: nroff -mandoc <file1> > <out1> nroff -mandoc <file2> > <out2> diff -d -u <out1> <out2> and for groff, using \"printf '%s\n%s\n' '.kern 0' '.ss 12 0' | groff -mandoc -Z - \" instead of 'nroff -mandoc' Add the option '-t', if the file contains a table. Read the output from 'diff -d -u ...' with 'less -R' or similar. -.-. If 'man' (man-db) is used to check the manual for warnings, the following must be set: The option \"-warnings=w\" The environmental variable: export MAN_KEEP_STDERR=yes (or any non-empty value) or (produce only warnings): export MANROFFOPT=\"-ww -b -z\" export MAN_KEEP_STDERR=yes (or any non-empty value) -.-