Package: procps Version: 2:4.0.4-7 Severity: minor Tags: patch * 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? an.tmac:<stdin>:150: misuse, warning: .IB is for at least 2 arguments, got 1 Use macro '.I' for one argument or split argument. * 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.11-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 procps depends on: ii init-system-helpers 1.68 ii libc6 2.40-6 ii libncursesw6 6.5-2+b1 ii libproc2-0 2:4.0.4-7 ii libsystemd0 257.2-3 ii libtinfo6 6.5-2+b1 Versions of packages procps recommends: ii linux-sysctl-defaults 4.11 ii psmisc 23.7-1 procps suggests no packages. -- no debconf information
Input file is procps_misc.3 Output from "mandoc -T lint procps_misc.3": (shortened list) 1 input text line longer than 80 bytes: Contains the value a... 1 input text line longer than 80 bytes: returns the current ... 1 input text line longer than 80 bytes: returns the integer ... 1 input text line longer than 80 bytes: returns the maximum ... 4 unterminated quoted argument -.-. Output from "test-groff -mandoc -t -ww -z procps_misc.3": (shortened list) 1 Use macro '.I' for one argument or split argument. 1 .IB is for at least 2 arguments, got 1 -.-. Use the correct macro for the font change of a single argument or split the argument into two. 150:.IB /proc/<PID>/ns -.-. 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 "\&". 62:returns the maximum string length for a PID on the system. For example, if the largest 63:possible PID value on was 123, then the length would be 3. If the file 67:returns the current Linux version as an encoded integer. On non-Linux systems that -.-. Split lines longer than about 80 characters into two or more lines. Appropriate break points are the end of a sentence and a subordinate clause; after punctuation marks. Line 101, length 97 returns the integer id (enum namespace_type) of the namespace for the given namespace \fIname\fR. -.-. Put a parenthetical sentence, phrase on a separate line, if not part of a code. See man-pages(7), item "semantic newline". procps_misc.3:101:returns the integer id (enum namespace_type) of the namespace for the given namespace \fIname\fR. procps_misc.3:104:returns the name of the namespace for the given \fIid\fR (enum namespace_type). -.-. 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. 11:.TH PROCPS_MISC 3 "August 2022" "libproc2" 33:.RI "int \fB procps_loadavg\fR (double *" av1 ", double *" av5 ", double *" av15 ");" 34:.RI "int \fB procps_uptime\fR (double *" uptime_secs ", double *" idle_secs ");" 42:.RI "int \fB procps_ns_get_id\fR (const char *" name ");" 43:.RI "const char\fB *procps_ns_get_name\fR (int " id ");" 44:.RI "int \fB procps_ns_read_pid\fR (int " pid ", struct procps_ns *" nsp ");" -.-. Output from "test-groff -mandoc -t -K utf8 -rF0 -rHY=0 -rCHECKSTYLE=10 -ww -z ": an.tmac:<stdin>:150: misuse, warning: .IB is for at least 2 arguments, got 1 Use macro '.I' for one argument or split argument.
--- procps_misc.3 2025-02-03 02:04:50.055682872 +0000 +++ procps_misc.3.new 2025-02-03 02:29:39.170637803 +0000 @@ -8,7 +8,7 @@ .\" version 2.1 of the License, or (at your option) any later version. .\" .\" -.TH PROCPS_MISC 3 "August 2022" "libproc2" +.TH PROCPS_MISC 3 "August 2022" libproc2 .\" Please adjust this date whenever revising the manpage. .\" .nh @@ -21,17 +21,17 @@ procps_misc \- API for miscellaneous inf Platform Particulars .RS 4 .PP -.RB "long " procps_cpu_count " (void); -.RB "long " procps_hertz_get " (void); -.RB "unsigned int " procps_pid_length " (void); -.RB "int " procps_linux_version " (void); +.RB "long " procps_cpu_count " (void);" +.RB "long " procps_hertz_get " (void);" +.RB "unsigned int " procps_pid_length " (void);" +.RB "int " procps_linux_version " (void);" .RE .PP Runtime Particulars .PP .RS 4 -.RI "int \fB procps_loadavg\fR (double *" av1 ", double *" av5 ", double *" av15 ");" -.RI "int \fB procps_uptime\fR (double *" uptime_secs ", double *" idle_secs ");" +.RI "int \fB procps_loadavg\fR (double *" av1 ", double *" av5 ", double *" av15 ); +.RI "int \fB procps_uptime\fR (double *" uptime_secs ", double *" idle_secs ); .RB "char *" procps_uptime_sprint " (void);" .RB "char *" procps_uptime_sprint_short " (void);" .RE @@ -39,9 +39,9 @@ Runtime Particulars Namespace Particulars .PP .RS 4 -.RI "int \fB procps_ns_get_id\fR (const char *" name ");" -.RI "const char\fB *procps_ns_get_name\fR (int " id ");" -.RI "int \fB procps_ns_read_pid\fR (int " pid ", struct procps_ns *" nsp ");" +.RI "int \fB procps_ns_get_id\fR (const char *" name ); +.RI "const char\fB *procps_ns_get_name\fR (int " id ); +.RI "int \fB procps_ns_read_pid\fR (int " pid ", struct procps_ns *" nsp ); .RE Link with \fI\-lproc2\fP. @@ -59,14 +59,18 @@ or an assumed \fI100\fR. Dividing tics by this value yields seconds. .BR procps_pid_length () -returns the maximum string length for a PID on the system. For example, if the largest -possible PID value on was 123, then the length would be 3. If the file -\fI/proc/sys/kernel/pid_max\fR is unreadable, the value is assumed to be \fI5\fR. +returns the maximum string length for a PID on the system. +For example, +if the largest possible PID value on was 123, +then the length would be 3. +If the file \fI/proc/sys/kernel/pid_max\fR is unreadable, +the value is assumed to be \fI5\fR. .BR procps_linux_version () -returns the current Linux version as an encoded integer. On non-Linux systems that -have an emulated proc filesystem this function returns the version of the -Linux emulation instead. +returns the current Linux version as an encoded integer. +On non-Linux systems +that have an emulated proc filesystem +this function returns the version of the Linux emulation instead. The version consists of three positive integers representing the major, minor and patch levels. The following macros are provided for encoding a given Linux version or @@ -83,8 +87,10 @@ LINUX_VERSION_PATCH(\ ver\ ) .RE .BR procps_loadavg () -fetches the system load average and puts the 1, 5 and 15 minute averages into -location(s) specified by any pointer which is not \fINULL\fR. +fetches the system load average +and puts the 1, 5 and 15 minute averages into location(s) +specified by any pointer +which is not \fINULL\fR. .BR procps_uptime () returns uptime and/or idle seconds into location(s) specified by any pointer @@ -98,10 +104,13 @@ up HH, MM .RE .BR procps_ns_get_id () -returns the integer id (enum namespace_type) of the namespace for the given namespace \fIname\fR. +returns the integer id +(enum namespace_type) +of the namespace for the given namespace \fIname\fR. .BR procps_ns_get_name () -returns the name of the namespace for the given \fIid\fR (enum namespace_type). +returns the name of the namespace for the given \fIid\fR +(enum namespace_type). .BR procps_ns_read_pid () returns the inodes for the namespaces of the given process in the @@ -142,12 +151,13 @@ The raw values for load average. Contains the release version of the Linux kernel or proc filesystem. .TP .I /proc/sys/kernel/pid_max -Contains the value at which PIDs wrap around, one greater than the maximum PID value. +Contains the value at which PIDs wrap around, +one greater than the maximum PID value. .TP .I /proc/uptime The raw values for uptime and idle time. .TP -.IB /proc/<PID>/ns +.I /proc/<PID>/ns contains the set of namespaces for a particular \fBPID\fR. .SH SEE ALSO
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. Not beginning each input sentence on a new line. Line length 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 -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 -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) -.-