Package: ucf Version: 3.0048 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 ' $' <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 * 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.9-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 ucf depends on: ii debconf [debconf-2.0] 1.5.89 ii libtext-wrapi18n-perl 0.06-10 ii procps 2:4.0.4-6 ii sensible-utils 0.0.24 ucf recommends no packages. ucf suggests no packages. -- debconf information excluded
Input file is ucfr.1 Output from "mandoc -T lint ucfr.1": (shortened list) 1 input text line longer than 80 bytes: ucfr \- Update Confi... -.-. Output from "test-groff -mandoc -t -ww -z ucfr.1": (shortened list) 1 trailing space in the line -.-. 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 "\&". 17:user. Please note that usually this means that we register actual 30:instead. This script is idempotent, associating a package to a file 42:Dry run. Print the actions that would be taken if the script is 48:(n defaults to 1). This turns on copious debugging information. 52:the configuration file from the registry. The association must already 56:is also given. In that case, the any associations for the 58:package name matches. This action is idempotent, asking for an 70:in consideration is owned by another package. This allows a package to -.-. 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. Line 3, length 88 ucfr \- Update Configuration File Registry: associate packages with configuration files -.-. The name of a man page is typeset in bold and the section in roman (see man-pages(7)). 135:ucf(1), ucf.conf(5). -.-. Split a punctuation from a single argument, if a two-font macro is meant. 77:.I /var/lib/ucf. 88:.I /var/lib/ucf/registry, 90:.I /var/lib/ucf/registry.X, 101:.I foo.conf, 118:.I foo, 120:.B ucfq. -.-. Put a parenthetical sentence, phrase on a separate line, if not part of a code. See man-pages(7), item "semantic newline". Not considered in a patch, too many lines. ucfr.1:15:is the full path to the location (usually under /etc) where the ucfr.1:63:option is used (in which case it just issues a diagnostic). -.-. No space is needed before a quote (") at the end of a line 6:.RI [ options "] " -.-. Output from "test-groff -mandoc -t -K utf8 -rF0 -rHY=0 -rCHECKSTYLE=10 -ww -z ": troff:<stdin>:6: warning: trailing space in the line
--- ucfr.1 2025-01-23 20:44:37.380378137 +0000 +++ ucfr.1.new 2025-01-23 20:58:32.312109934 +0000 @@ -1,9 +1,10 @@ .TH UCFR 1 "Feb 16 2018" "Debian" "Debian GNU/Linux manual" .SH NAME -ucfr \- Update Configuration File Registry: associate packages with configuration files +ucfr \- Update Configuration File Registry: associate packages with +configuration files .SH SYNOPSIS .B ucfr -.RI [ options "] " +.RI [ options ] .I <Package> .I <Path to configuration file> .SH DESCRIPTION @@ -14,7 +15,8 @@ sense, its owner), and .I Path to configuration file is the full path to the location (usually under /etc) where the configuration file lives, and is potentially modified by the end -user. Please note that usually this means that we register actual +user. +Please note that usually this means that we register actual files, and not symbolic links to files. .B ucfr will follow symbolic links and register the real file, and not the @@ -27,8 +29,10 @@ provides conffiles for configuration fil .B Debian package, but handled by the postinst by .I ucf -instead. This script is idempotent, associating a package to a file -multiple times is not an error. It is normally an error to try to +instead. +This script is idempotent, associating a package to a file +multiple times is not an error. +It is normally an error to try to associate a file which is already associated with another package, but this can be overridden by using the .I \-\-force @@ -39,23 +43,28 @@ option. Print a short usage message .TP .B "\-n, \-\-no\-action" -Dry run. Print the actions that would be taken if the script is +Dry run. +Print the actions that would be taken if the script is invoked, but take no action. .TP .B "\-d [n], \-\-debug [n]" Set the debug level to the (optional) level .I n -(n defaults to 1). This turns on copious debugging information. +(n defaults to 1). +This turns on copious debugging information. .TP .B "\-p, \-\-purge" Removes all vestiges of the association between the named package and -the configuration file from the registry. The association must already +the configuration file from the registry. +The association must already exist; if the configuration file is associated with some other package, an error happens, unless the option .I \-\-force -is also given. In that case, the any associations for the +is also given. +In that case, the any associations for the configuration file are removed from the registry, whether or not the -package name matches. This action is idempotent, asking for an +package name matches. +This action is idempotent, asking for an association to be purged multiple times does not result in an error, since attempting to remove an non-existent association is silently ignored unless the @@ -67,14 +76,15 @@ Make the script be very verbose about se .TP .B "\-f, \-\-force" This option forces operations requested even if the configuration file -in consideration is owned by another package. This allows a package to +in consideration is owned by another package. +This allows a package to .I "hijack" a configuration file from another package, or to purge the association between the file and some other package in the registry. .TP .B "\-\-state\-dir /path/to/dir" Set the state directory to /path/to/dir instead of the default -.I /var/lib/ucf. +.IR /var/lib/ucf . Used mostly for testing. .SH USAGE The most common case usage is pretty simple: a single line invocation @@ -85,9 +95,9 @@ to forget about the association with the (using the \-\-purge option) is all that is needed (assuming ucfr is still on the system). .SH FILES -.I /var/lib/ucf/registry, +.IR /var/lib/ucf/registry , and -.I /var/lib/ucf/registry.X, +.IR /var/lib/ucf/registry.X , where .I X is a small integer, where previous versions of the registry are @@ -98,7 +108,7 @@ stored. If the package .I foo wants to use ucfr to associate itself with a configuration file -.I foo.conf, +.IR foo.conf , a simple invocation of ucfr in the postinst file is all that is needed: .PP @@ -115,9 +125,9 @@ examples in /usr/share/doc/ucf/examples) .I /etc/foo.conf .PP If you want to remove all the conf files for a given package -.I foo, +.IR foo , the simplest way is to use -.B ucfq. +.BR ucfq . For example .PP .B ucfq @@ -132,7 +142,7 @@ For example .I \-v $cfile ; .B done .SH "SEE ALSO" -ucf(1), ucf.conf(5). +.BR ucf (1),\ ucf.conf (5). .SH AUTHOR This manual page was written Manoj Srivastava <sriva...@debian.org>, for the Debian GNU/Linux system.
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) -.-