Package: attr Version: 1:2.5.2-2 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 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>:36: warning: trailing space in the line an.tmac:<stdin>:41: misuse, warning: .IR 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.6-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 attr depends on: ii libattr1 1:2.5.2-2 ii libc6 2.40-4 attr recommends no packages. attr suggests no packages. -- no debconf information
Input file is setfattr.1 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 -.- So any 'generator' should check its products with the above mentioned 'groff', 'mandoc', and additionally with 'nroff ...'. This is just a simple quality control measure. The 'generator' may have to be corrected to get a better man page, the source file may, and any additional file may. Common defects: Input text line longer than 80 bytes. 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. Lines should thus be shorter. 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 of '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) -.-. Output from "mandoc -T lint setfattr.1": (shortened list) 2 unterminated quoted argument 1 whitespace at end of input line -.-. Output from "test-groff -mandoc -t -ww -z setfattr.1": (shortened list) 1 Use macro '.I' for one argument or split argument. 1 .IR is for at least 2 arguments, got 1 1 trailing space in the line -.-. Lines containing '\c' (' \c' does not make sense): 75:If a dash (\c -.- 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 1 -.-. Change two HYPHEN-MINUSES (code 0x2D) to an em-dash (\(em), if one is intended. " \(em " creates a too big gap in the text (in "troff"). An en-dash is usually surrounded by a space, while an em-dash is used without spaces. "man" (1 byte characters in input) transforms an en-dash (\(en) to one HYPHEN-MINUS, and an em-dash to two HYPHEN-MINUSES without considering the space around it. If "--" are two single "-" (begin of an option or end of options) then use "\-\-". setfattr.1:83:.BR "getfattr --only-values" . -.-. Change -- in x--y to \(em (em-dash), or, if an option, to \-\- 83:.BR "getfattr --only-values" . -.-. Use the correct macro for the font change of a single argument or split the argument into two. 41:.IR name -.-. 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:.B "$ setfattr -n user.foo -v bar file.txt 107:.B "# setfattr -n trusted.md5sum -v d41d8cd98f00b204e00998ecf8427e file.txt -.-. 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 "\&". 49:Specifies the new value of the extended attribute. There are three methods 51:quotes, the inner string is treated as text. In that case, backslashes and 53:backslash. Any control characters can be encoded as a backslash followed by 54:three digits as its ASCII code in octal. If the given string begins with 0x or 55:0X, it expresses a hexadecimal number. If the given string begins with 0s or 82:Do not decode the attribute value. Can be used to set values obtained with -.-. Put a subordinate sentence (after a comma) on a new line. 51:quotes, the inner string is treated as text. In that case, backslashes and 55:0X, it expresses a hexadecimal number. If the given string begins with 0s or 56:0S, base64 encoding is expected. Also see the \-\-encoding option of 65:is a symbolic link, it is not followed, but is instead itself the 95:All remaining parameters are interpreted as file names, even if they -.-. Remove quotes when there is no space character between them and the quotes are not for emphasis (markup), for example as an argument to a macro. 45:.BR \-n " \f2name\f1, " \-\-name "=\f2name\f1" 48:.BR \-v " \f2value\f1, " \-\-value "=\f2value\f1" 59:.BR \-x " \f2name\f1, " \-\-remove "=\f2name\f1" -.-. Output from "test-groff -mandoc -t -K utf8 -rF0 -rHY=0 -rCHECKSTYLE=10 -ww -z ": troff:<stdin>:36: warning: trailing space in the line an.tmac:<stdin>:41: misuse, warning: .IR is for at least 2 arguments, got 1 Use macro '.I' for one argument or split argument. -.- Change \f1 to \fR \f2 to \fI \f3 to \fB
--- setfattr.1 2025-01-08 17:42:09.120893760 +0000 +++ setfattr.1.new 2025-01-08 18:13:50.918042589 +0000 @@ -28,59 +28,69 @@ setfattr \- set extended attributes of filesystem objects .SH SYNOPSIS .nf -\f3setfattr\f1 [\f3\-h\f1] \f3\-n name\f1 [\f3\-v value\f1] \f3pathname\f1... -\f3setfattr\f1 [\f3\-h\f1] \f3\-x name\f1 \f3pathname\f1... -\f3setfattr\f1 [\f3\-h\f1] \f3\-\-restore=file\f1 +\fBsetfattr\fR [\fB\-h\fR] \fB\-n name\fR [\fB\-v value\fR] \fBpathname\fR... +\fBsetfattr\fR [\fB\-h\fR] \fB\-x name\fR \fBpathname\fR... +\fBsetfattr\fR [\fB\-h\fR] \fB\-\-restore=file\fR .fi .SH DESCRIPTION -The +The .B setfattr command associates a new .I value with an extended attribute -.IR name +.I name for each specified file. .SH OPTIONS .TP 4 -.BR \-n " \f2name\f1, " \-\-name "=\f2name\f1" +.BR \-n " \fIname\fR, " \-\-name= \fIname\fR Specifies the name of the extended attribute to set. .TP -.BR \-v " \f2value\f1, " \-\-value "=\f2value\f1" -Specifies the new value of the extended attribute. There are three methods -available for encoding the value. If the given string is enclosed in double -quotes, the inner string is treated as text. In that case, backslashes and -double quotes have special meanings and need to be escaped by a preceding -backslash. Any control characters can be encoded as a backslash followed by -three digits as its ASCII code in octal. If the given string begins with 0x or -0X, it expresses a hexadecimal number. If the given string begins with 0s or -0S, base64 encoding is expected. Also see the \-\-encoding option of -getfattr(1). +.BI \-v " value\fR, " \-\-value= value +Specifies the new value of the extended attribute. +There are three methods available for encoding the value. +If the given string is enclosed in double quotes, +the inner string is treated as text. +In that case, +backslashes +and double quotes have special meanings +and need to be escaped by a preceding backslash. +Any control characters can be encoded as a backslash followed by +three digits as its ASCII code in octal. +If the given string begins with 0x or 0X, +it expresses a hexadecimal number. +If the given string begins with 0s or 0S, +base64 encoding is expected. +Also see the \-\-encoding option of +.BR getfattr (1). .TP -.BR \-x " \f2name\f1, " \-\-remove "=\f2name\f1" +.BI \-x " name\fR, " \-\-remove= name Remove the named extended attribute entirely. .TP .BR \-h ", " \-\-no-dereference -Do not follow symlinks. If +Do not follow symlinks. +If .I pathname -is a symbolic link, it is not followed, but is instead itself the -inode being modified. +is a symbolic link, +it is not followed, +but is instead itself the inode being modified. .TP -.BR \-\-restore =\f2file\f1 +.BI \-\-restore= file Restores extended attributes from file. The file must be in the format generated by the .B getfattr command with the .B \-\-dump option. -If a dash (\c -.IR \- ) +If a dash +.RI ( \- ) is given as the file name, .B setfattr reads from standard input. .TP .B \-\-raw -Do not decode the attribute value. Can be used to set values obtained with -.BR "getfattr --only-values" . +Do not decode the attribute value. +Can be used to set values obtained with +.BR "getfattr \-\-only-values" . .TP .B \-\-version Print the version of @@ -92,19 +102,19 @@ Print help explaining the command line o .TP .B \-\- End of command line options. -All remaining parameters are interpreted as file names, even if they -start with a dash character. +All remaining parameters are interpreted as file names, +even if they start with a dash character. .SH EXAMPLES Add extended attribute to user namespace: .PP .nf -.B "$ setfattr -n user.foo -v bar file.txt +.B "$ setfattr \-n user.foo \-v bar file.txt .fi .PP To add md5sum of the file as an extended attribute: .PP .nf -.B "# setfattr -n trusted.md5sum -v d41d8cd98f00b204e00998ecf8427e file.txt +.B "# setfattr \-n trusted.md5sum \-v d41d8cd98f00b204e00998ecf8427e file.txt .fi .SH AUTHOR Andreas Gruenbacher,