Package: initramfs-tools-core Version: 0.148.1 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 grep -n -e ' $' -e '\\~$' -e ' \\f.$' -e ' \\"' <file> to find (most) 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>:667: misuse, warning: .BR is for at least 2 arguments, got 0 Use macro '.B' for one argument or split argument. an-end-check:<stdin>: Warning: Different number of .RS and .RE calls, an-RS-open=-1 at end of file * 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: 13.0 APT prefers testing APT policy: (500, 'testing') Architecture: amd64 (x86_64) Kernel: Linux 6.12.30-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 initramfs-tools-core depends on: ii coreutils 9.7-2 ii cpio 2.15+dfsg-2 ii dracut-install 106-6 ii e2fsprogs 1.47.2-1+b1 ii initramfs-tools-bin 0.148.1 ii klibc-utils 2.0.14-1 ii kmod 34.2-2 ii logsave 1.47.2-1+b1 ii udev 257.6-1 Versions of packages initramfs-tools-core recommends: pn busybox | busybox-static <none> ii zstd 1.5.7+dfsg-1 Versions of packages initramfs-tools-core suggests: ii bash-completion 1:2.16.0-7 -- no debconf information
Input file is initramfs-tools.7 Output from "mandoc -T lint initramfs-tools.7": (shortened list) 6 input text line longer than 80 bytes 1 skipping end of block that is not open -.-. Output from test-nroff -mandoc -t -ww -z initramfs-tools.7: (shortened list) 1 Use macro '.B' for one argument or split argument. 1 .BR is for at least 2 arguments, got 0 -.-. Reduce space between words. initramfs-tools.7:1:.TH INITRAMFS-TOOLS 7 "2018/07/18" "initramfs\-tools" "Linux Programmer's Manual" initramfs-tools.7:663:This manual was written by David H\[:a]rdeman <da...@hardeman.nu>, -.-. Change -- in x--y to \(em (em-dash), or, if an option, to \-\- 634:using the \fB--initrd\fR option. -.-. 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. 71:is a mac address in pxelinux format with leading "01-" and "-" as separations. 292:rm -f ${TEMP_FILE} 634:using the \fB--initrd\fR option. -.-. Strings longer than 3/4 of a standard line length (80). Use "\:" to split the string at the end of an output line, for example a long URL (web address). This is a groff extension. 35 \fBhttps://www.kernel.org/doc/Documentation/filesystems/tmpfs.txt\fR for -.-. Wrong distance (not two spaces) 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. 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 1, length 82 .TH INITRAMFS-TOOLS 7 "2018/07/18" "initramfs\-tools" "Linux Programmer's Manual" Line 24, length 89 the binary to hand over execution to on the root fs after the initramfs scripts are done. Line 77, length 115 either local or NFS (affects which initramfs scripts are run, see the "Subdirectories" section under boot scripts). Line 357, length 85 Where PREREQ is modified to list other scripts in the same subdirectory if necessary. Line 360, length 82 A number of functions (mostly dealing with output) are provided to boot scripts in Line 484, length 166 allows boot scripts to change exported variables that are listed on top of init. Write the new values to it. It will be sourced after an boot script run if it exists. Line 525, length 137 An example boot script would look something like this (and would usually be placed in /etc/initramfs-tools/scripts/local-top/frobnicate): Longest line is number 484 with 166 characters -.-. The name of a man page is typeset in bold and the section in roman (see man-pages(7)). 61:\fInfs(5)\fP. 591:passes the path to init(8) usually /sbin/init. -.-. Remove unnecessary double font change (e.g., \fR\fI) in a row or (better) use a two-fonts macro. 23:\fB\fI init= "<path to real init>" 27:\fB\fI initramfs.clear 31:\fB\fI initramfs.runsize 39:\fB\fI root= "<path to blockdevice>" 44:\fB\fI rootfstype 48:\fB\fI rootdelay 53:\fB\fI rootflags 57:\fB\fI nfsroot 64:\fB\fI ip 70:\fB\fI BOOTIF 76:\fB\fI boot 80:\fB\fI resume 87:\fB\fI resume_offset 92:\fB\fI quiet 96:\fB\fI ro 100:\fB\fI rw 104:\fB\fI blacklist 110:\fB\fI panic 115:\fB\fI debug 121:\fB\fI break 132:\fB\fI netconsole 136:\fB\fI all_generic_ide 224:\fB\fI 234:\fB\fI 247:\fB\fI 259:\fB\fI 284:in a file, and call the \fB\fIprepend_earlyinitramfs\fR function. The file 300:\fB\fI MODULESDIR 303:\fB\fI version 306:\fB\fI CONFDIR 309:\fB\fI DESTDIR 312:\fB\fI DPKG_ARCH 315:\fB\fI verbose 318:\fB\fI BUSYBOX, KEYMAP, MODULES 321:\fB\fI BUSYBOXDIR 365:\fB\fI 375:\fB\fI 385:\fB\fI 395:\fB\fI 400:\fB\fI 417:\fB\fI 432:\fB\fI 440:\fB\fI 446:\fB\fI 452:\fB\fI 461:\fB\fI 468:\fB\fI 474:\fB\fI 482:\fB\fI 567:\fB\fI ROOT 572:\fB\fI ROOTDELAY, ROOTFLAGS, ROOTFSTYPE, IP 577:\fB\fI DPKG_ARCH 580:\fB\fI blacklist, panic, quiet, resume, noresume, resume_offset 583:\fB\fI break 586:\fB\fI REASON 590:\fB\fI init 593:\fB\fI readonly 597:\fB\fI rootmnt 600:\fB\fI debug -.-. Put a parenthetical sentence, phrase on a separate line, if not part of a code. See man-pages(7), item "semantic newline". initramfs-tools.7:32:The size of the \fI/run\fP tmpfs mount point in bytes (suffixes are supported) initramfs-tools.7:77:either local or NFS (affects which initramfs scripts are run, see the "Subdirectories" section under boot scripts). initramfs-tools.7:153:mkinitramfs build on possible errors (exitcode != 0). initramfs-tools.7:226:adds a module (and any modules which it depends on) to the initramfs image. initramfs-tools.7:236:reads a file containing a list of modules (one per line) to be added to the initramfs-tools.7:237:initramfs image. The file can contain comments (lines starting with #) and initramfs-tools.7:249:adds a module (and its dependencies) to the initramfs image and also initramfs-tools.7:289:TEMP_FILE=$(mktemp ...) initramfs-tools.7:304:is the $(uname \-r) linux version against mkinitramfs is run. initramfs-tools.7:335:different scripts in one subdirectory (see "Subdirectories" below) are initramfs-tools.7:360:A number of functions (mostly dealing with output) are provided to boot scripts in initramfs-tools.7:525:An example boot script would look something like this (and would usually be placed in /etc/initramfs-tools/scripts/local-top/frobnicate): -.-. Do not use ligature for command name "fi" 516:fi 549:fi 553:fi -.-. Only one space character is after a possible end of sentence (after a punctuation, that can end a sentence). [List of affected lines removed.] -.- 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. initramfs-tools.7:1:.TH INITRAMFS-TOOLS 7 "2018/07/18" "initramfs\-tools" "Linux Programmer's Manual" -.-. Put a (long) web address on a new output line to reduce the posibility of splitting the address between two output lines. Or inhibit hyphenation with "\%" in front of the name. 35:\fBhttps://www.kernel.org/doc/Documentation/filesystems/tmpfs.txt\fR for -.-. Add "\&" after an ellipsis, when it does not end a sentence. 289:TEMP_FILE=$(mktemp ...) 290: ... -.-. Output from "test-groff -mandoc -t -K utf8 -rF0 -rHY=0 -rCHECKSTYLE=0 -ww -z ": an.tmac:<stdin>:667: misuse, warning: .BR is for at least 2 arguments, got 0 Use macro '.B' for one argument or split argument. an-end-check:<stdin>: Warning: Different number of .RS and .RE calls, an-RS-open=-1 at end of file Output from "test-nroff -mandoc -t -K utf8 -rF0 -rHY=0 -rCHECKSTYLE=0 -ww -z ": an.tmac:<stdin>:667: misuse, warning: .BR is for at least 2 arguments, got 0 Use macro '.B' for one argument or split argument. an-end-check:<stdin>: Warning: Different number of .RS and .RE calls, an-RS-open=-1 at end of file Generally: Split (sometimes) lines after a punctuation mark; before a conjunction.
--- initramfs-tools.7 2025-06-09 23:11:46.050562571 +0000 +++ initramfs-tools.7.new 2025-06-09 23:28:14.206494783 +0000 @@ -1,4 +1,4 @@ -.TH INITRAMFS-TOOLS 7 "2018/07/18" "initramfs\-tools" "Linux Programmer's Manual" +.TH INITRAMFS-TOOLS 7 2018/07/18 initramfs\-tools "Linux Programmer's Manual" .SH NAME initramfs-tools \- an introduction to writing scripts for mkinitramfs @@ -32,8 +32,10 @@ clear screen at the beginning The size of the \fI/run\fP tmpfs mount point in bytes (suffixes are supported) or as percentage of your physical RAM. This parameter is used as the value of the size mount option to tmpfs. See -\fBhttps://www.kernel.org/doc/Documentation/filesystems/tmpfs.txt\fR for -details. The default is 10%. +.nf +\fBhttps://www.kernel.org/doc/Documentation/filesystems/tmpfs.txt\fR +.fi +for details. The default is 10%. .TP \fB\fI root= "<path to blockdevice>" @@ -58,7 +60,7 @@ set the file system mount option string. can be either "auto" to try to get the relevant information from DHCP or a string of the form NFSSERVER:NFSPATH or NFSSERVER:NFSPATH:NFSOPTS. Use root=/dev/nfs for NFS to kick to in. NFSOPTS can be looked up in -\fInfs(5)\fP. +\fInfs\fP(5). .TP \fB\fI ip @@ -68,7 +70,7 @@ in any recent Linux source for details. .TP \fB\fI BOOTIF -is a mac address in pxelinux format with leading "01-" and "-" as separations. +is a mac address in pxelinux format with leading "01\-" and "\-" as separations. pxelinux passes mac address of network card used to PXE boot on with this bootarg. @@ -284,13 +286,15 @@ If you need to prepend data to the initr in a file, and call the \fB\fIprepend_earlyinitramfs\fR function. The file can be disposed of as soon as the function returns. +.RS .B Example: .nf TEMP_FILE=$(mktemp ...) ... prepend_earlyinitramfs ${TEMP_FILE} -rm -f ${TEMP_FILE} +rm \-f ${TEMP_FILE} +.fi .RE .SS Exported variables @@ -588,7 +592,9 @@ Argument passed to the \fIpanic\fP helpe you landed in the initramfs shell. .TP \fB\fI init -passes the path to init(8) usually /sbin/init. +passes the path to +.BR init (8) +usually /sbin/init. .TP \fB\fI readonly is the default for mounting the root corresponds to the ro bootarg. @@ -631,7 +637,7 @@ scripts do nothing if the environment va set to \fBNo\fR. This will be the case for kernel packages built with \fBmake deb-pkg\fR and with \fBCONFIG_BLK_DEV_INITRD\fR not set in the kernel config, or built with \fBmake-kpkg\fR and not -using the \fB--initrd\fR option. +using the \fB\-\-initrd\fR option. .SH DEBUG @@ -664,7 +670,6 @@ This manual was written by David H\[:a] updated by Maximilian Attems <m...@debian.org>. .SH SEE ALSO -.BR .IR initramfs.conf (5), .IR mkinitramfs (8), .IR update-initramfs (8),
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> To find trailing space use grep -n -e ' $' -e ' \\f.$' -e ' \\"' <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) -.-