]> git.ipfire.org Git - thirdparty/man-pages.git/log
thirdparty/man-pages.git
2 years ago*.mk: MANEXT: Support man pages with .man and/or .in suffixes
Alejandro Colomar [Sat, 29 Apr 2023 16:46:00 +0000 (18:46 +0200)] 
*.mk: MANEXT: Support man pages with .man and/or .in suffixes

Those are common in some projects in their source pages; especially
'.in' when it's a template that will be completed by the build system.

This allows linting other projects' pages by running a command like:

$ make lint MANDIR=/home/alx/src/nginx/unit/master/docs/man

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years ago*.mk: lint-mdoc-mandoc: Silence warning about referenced manuals not found
Alejandro Colomar [Fri, 28 Apr 2023 15:04:35 +0000 (17:04 +0200)] 
*.mk: lint-mdoc-mandoc: Silence warning about referenced manuals not found

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years ago*.mk: lint-mdoc-mandoc: Silence warnings about ISO 8601 format in the date
Alejandro Colomar [Fri, 28 Apr 2023 14:52:00 +0000 (16:52 +0200)] 
*.mk: lint-mdoc-mandoc: Silence warnings about ISO 8601 format in the date

ISO 8601 is the standard way to express a date.  Don't warn about it.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years ago*.mk: lint-mdoc-mandoc: Silence warnings about lowercase in Dt
Alejandro Colomar [Fri, 28 Apr 2023 14:50:01 +0000 (16:50 +0200)] 
*.mk: lint-mdoc-mandoc: Silence warnings about lowercase in Dt

See commit
4896a4f8c4b8 ("lint-man.mk: lint-man-mandoc: Silence warnings about lowercase in TH")
Cc: Ingo Schwarze <schwarze@openbsd.org>
Cc: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years ago*.mk: Fix error detection
Alejandro Colomar [Fri, 28 Apr 2023 14:02:26 +0000 (16:02 +0200)] 
*.mk: Fix error detection

See also this commit:
0440d04f8317 ("lint-man.mk: lint-man-groff-eqn: Fix error detection")

Reported-by: Ralph Corderoy <ralph@inputplus.co.uk>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years ago*.mk: Rewrite pipelines to make it easier to ignore some warnings
Alejandro Colomar [Fri, 28 Apr 2023 14:00:31 +0000 (16:00 +0200)] 
*.mk: Rewrite pipelines to make it easier to ignore some warnings

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years ago*.mk: Move -T$NROFF_OUT_DEVICE into NROFFFLAGS
Alejandro Colomar [Fri, 28 Apr 2023 13:32:07 +0000 (15:32 +0200)] 
*.mk: Move -T$NROFF_OUT_DEVICE into NROFFFLAGS

This avoids breaking some long lines.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years ago*.mk: Move -rCHECKSTYLE to NROFFFLAGS
Alejandro Colomar [Fri, 28 Apr 2023 13:00:33 +0000 (15:00 +0200)] 
*.mk: Move -rCHECKSTYLE to NROFFFLAGS

Having that in TROFFFLAGS caused repeated warnings for every different
format we produce.  Let's have these warnings only in nroff mode.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years ago*.mk: Keep error messages in stderr
Alejandro Colomar [Fri, 28 Apr 2023 12:53:47 +0000 (14:53 +0200)] 
*.mk: Keep error messages in stderr

We redirected them to stdout for some filtering, but forgot to put it
back where it belongs.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years ago*.mk: Handle pathnames with ':'
Alejandro Colomar [Tue, 25 Apr 2023 23:39:22 +0000 (01:39 +0200)] 
*.mk: Handle pathnames with ':'

Since make(1) uses ':' as a special character in rules, it needs to be
handled carefully.  A way to make it work is to escape it with '\:'.  We
can use sed(1) to do that right when we get the pathnames.  The only
problem with ':' is in rules' targets and prerequisites: everywhere else
it's fine; so let's discuss what needs to be done in those places:

-  In the targets, it's as easy as escaping.

-  In prerequisites, we can't second-expand variables containing such
   pathnames, as the '\' would not be used by make(1) to escape the ':',
   but it would be interpreted as part of the pathname.  This means we
   need to expand rules written using second expansion into several
   rules that only expand their variables once.

-  $(wildcard ...) also performs the escape, so after using it the
   pathnames are not escaped.  If we used those variables in targets, we
   would need to escape the ':'s again, but since we don't we can skip
   that.  The trick to make this work is to second-expand these
   variables.

Link: <https://stackoverflow.com/a/76096683/6872717>
Cc: GNU Make <bug-make@gnu.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years ago*.mk: Use empty recipes for .PHONY targets
Alejandro Colomar [Tue, 25 Apr 2023 18:52:12 +0000 (20:52 +0200)] 
*.mk: Use empty recipes for .PHONY targets

The @: dummy recipe was there to avoid having rules without recipes.
Rules without recipes can be confusing, as the reader can't know if a
recipe is being defined somewhere else.  Also, implicit rules might
apply (in general, but we disable all implicit stuff).

However, @: is also problematic, since make really needs to run that
command, which is unnecessary overhead.  But okay, :(1) (really called
true(1), but wouldn't it be a nice man page name?) that's not meaningful
overhead.

And the bigger problem: having a recipe hides the usual:

make: Nothing to be done for 'all'.

We already disable it by using .SILENCE:, but the message can be seen
when using V=1 (after this patch; prior to this patch, it was impossible
to find that message).  It is good to be able to know that make(1)
says there's nothing to be done, as a confirmation.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agoman*/: wfix
Günther Noack [Sat, 22 Apr 2023 15:06:46 +0000 (17:06 +0200)] 
man*/: wfix

Fix spelling of "run time", as documented in man-pages(7):

-  "run time" in two words when used as a noun
-  "run-time" with hyphen when used as an adjective

There is another occurrence in bpf-helpers.7,
but that content gets generated from the kernel source
and should be fixed there.

Signed-off-by: Günther Noack <gnoack3000@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agogroff.mk, checkstyle.tmac: Remove unnecessary tmac file
Alejandro Colomar [Sun, 23 Apr 2023 14:34:41 +0000 (16:34 +0200)] 
groff.mk, checkstyle.tmac: Remove unnecessary tmac file

We used it for transforming groff_man(7)'s CHECKSTYLE into errors, but
we already do that with grep(1).  Moreover, the tmac was hiding
troff(1)'s warnings.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agoMakefile: Remove unused flag
Alejandro Colomar [Sun, 23 Apr 2023 01:34:56 +0000 (03:34 +0200)] 
Makefile: Remove unused flag

We don't have a recursive make, so this flag is not used.  Moreover, if
ever, for some rare reason, make traverses directories, it would be good
to know.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years ago*.mk: build-pdf: Build PDF manual pages
Alejandro Colomar [Sun, 23 Apr 2023 01:05:29 +0000 (03:05 +0200)] 
*.mk: build-pdf: Build PDF manual pages

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years ago*.mk: build-ps*: Build PostScript manual pages
Alejandro Colomar [Sun, 23 Apr 2023 00:31:32 +0000 (02:31 +0200)] 
*.mk: build-ps*: Build PostScript manual pages

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years ago*.mk: TROFFFLAGS{_MAN,_MDOC}: Include -man/-mdoc in the flags variables
Alejandro Colomar [Sun, 23 Apr 2023 00:24:03 +0000 (02:24 +0200)] 
*.mk: TROFFFLAGS{_MAN,_MDOC}: Include -man/-mdoc in the flags variables

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agogroff.mk: TROFFFLAGS_MAN: tfix
Alejandro Colomar [Sun, 23 Apr 2023 00:22:13 +0000 (02:22 +0200)] 
groff.mk: TROFFFLAGS_MAN: tfix

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years ago*.mk: ffix
Alejandro Colomar [Sun, 23 Apr 2023 00:19:47 +0000 (02:19 +0200)] 
*.mk: ffix

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agogroff.mk: TROFFFLAGS: Remove -t
Alejandro Colomar [Sun, 23 Apr 2023 00:02:43 +0000 (02:02 +0200)] 
groff.mk: TROFFFLAGS: Remove -t

That was probably a typo; it doesn't make sense to ask troff(1) to pass
the tbl(1) preprocessor, since we already did.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agoMakefile: help-variables: Document MANWIDTH and NROFF_OUT_DEVICE
Alejandro Colomar [Sun, 23 Apr 2023 00:01:46 +0000 (02:01 +0200)] 
Makefile: help-variables: Document MANWIDTH and NROFF_OUT_DEVICE

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years ago*.mk: Factor out device-independent groff(1) flags
Alejandro Colomar [Sat, 22 Apr 2023 23:59:24 +0000 (01:59 +0200)] 
*.mk: Factor out device-independent groff(1) flags

Add {EXTRA_,}NROFFFLAGS (used exclusively in 'build-catman').
This refactor will allow building other formats.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agoMakefile: help-variables: Document some troff(1) flags variables
Alejandro Colomar [Sat, 22 Apr 2023 23:25:03 +0000 (01:25 +0200)] 
Makefile: help-variables: Document some troff(1) flags variables

Fixes: 3c8198d17 ("*.mk: build-catman-troff, build-catman-troff-man, build-catman-troff-mdoc: Support mdoc(7) pages")
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years ago*.mk: build-pre*: Split device-independent preprocessing from the catman targets
Alejandro Colomar [Sat, 22 Apr 2023 23:22:51 +0000 (01:22 +0200)] 
*.mk: build-pre*: Split device-independent preprocessing from the catman targets

To build other output formats from the same sources, let's split the
generic part of the pipelines.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agoinstall/_.mk: Make pattern rule more explicit
Alejandro Colomar [Sat, 22 Apr 2023 23:05:07 +0000 (01:05 +0200)] 
install/_.mk: Make pattern rule more explicit

Specify $DESTDIR, so that it's more clear what this rule is about.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agodist.mk: Create directories with $INSTALL
Alejandro Colomar [Sat, 22 Apr 2023 23:02:43 +0000 (01:02 +0200)] 
dist.mk: Create directories with $INSTALL

Other directories in $builddir are created with $MKDIR, but since these
should be as if installed, it makes sense to use the same command as
when installing.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years ago*/mk: mkdir -p (and install -d) are safe to use
Alejandro Colomar [Sat, 22 Apr 2023 22:35:12 +0000 (00:35 +0200)] 
*/mk: mkdir -p (and install -d) are safe to use

There are no race conditions, contrary to what some sources say.
Previously, we had each directory depend on its parent directory, so
that only a few parent-most directories would be created with parents,
and all others would be created when their parents exist.  That was due
to FUD about TOCTOU race conditions with mkdir -p and parallel make, but
it was just FUD.

This patch makes it so that each directory is directly created with
parents without specifying any dependency.  This simplifies the makefile
at some cost: calling mkdir -p so many times is a bit slower.  However,
it's only about 5%, so we can live with it, since we're talking about
hundreds of a second for creating all the directories that this build
system knows about.

Reported-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years ago*.mk: Make comment more generic
Alejandro Colomar [Sat, 22 Apr 2023 19:25:39 +0000 (21:25 +0200)] 
*.mk: Make comment more generic

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years ago*.mk: License consistently with GPL-3.0-or-later
Alejandro Colomar [Sat, 22 Apr 2023 19:13:09 +0000 (21:13 +0200)] 
*.mk: License consistently with GPL-3.0-or-later

Also, use consistent formatting for the license and copyright.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years ago*.mk: check-catman: Support mdoc(7) pages
Alejandro Colomar [Sat, 22 Apr 2023 18:55:21 +0000 (20:55 +0200)] 
*.mk: check-catman: Support mdoc(7) pages

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years ago*.mk: build-catman-troff, build-catman-troff-man, build-catman-troff-mdoc: Support...
Alejandro Colomar [Sat, 22 Apr 2023 18:35:46 +0000 (20:35 +0200)] 
*.mk: build-catman-troff, build-catman-troff-man, build-catman-troff-mdoc: Support mdoc(7) pages

Split the old build-catman-troff target into two subtargets; the ...-man
one supports man(7) pages, while the ...-mdoc one supports mdoc(7) pages.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agocatman.mk: build-catman-troff: Fail if troff(1) writes to stderr
Alejandro Colomar [Sat, 22 Apr 2023 18:38:19 +0000 (20:38 +0200)] 
catman.mk: build-catman-troff: Fail if troff(1) writes to stderr

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years ago*.mk: lint, lint-mdoc, lint-mdoc-mandoc: Support mdoc(7) pages
Alejandro Colomar [Sat, 22 Apr 2023 14:47:51 +0000 (16:47 +0200)] 
*.mk: lint, lint-mdoc, lint-mdoc-mandoc: Support mdoc(7) pages

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agoMakefile: Update and remove comments
Alejandro Colomar [Sat, 22 Apr 2023 12:12:59 +0000 (14:12 +0200)] 
Makefile: Update and remove comments

-  We don't use %/. for directories anymore.

-  %/ targets are obviously directories; no need to say.

-  Don't need to document how we create directories.  That should be
   obvious from the code.

Fixes: ac288b42c ("*.mk: Remove unnecessary '.' after directory names (but keep the '/')")
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agoregex.3: srcfix
Alejandro Colomar [Fri, 21 Apr 2023 22:09:37 +0000 (00:09 +0200)] 
regex.3: srcfix

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agoregex.3: We rewrote most of the page
Alejandro Colomar [Fri, 21 Apr 2023 22:08:47 +0000 (00:08 +0200)] 
regex.3: We rewrote most of the page

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agosockaddr.3type: POSIX Issue 8 will solve strict-aliasing issues with these types
Alejandro Colomar [Tue, 11 Apr 2023 20:13:00 +0000 (22:13 +0200)] 
sockaddr.3type: POSIX Issue 8 will solve strict-aliasing issues with these types

Link: <https://austingroupbugs.net/view.php?id=1641>
Reported-by: Bastien Roucariès <rouca@debian.org>
Reported-by: Alejandro Colomar <alx@kernel.org>
Reviewed-by: Eric Blake <eblake@redhat.com>
Cc: glibc <libc-alpha@sourceware.org>
Cc: GCC <gcc@gcc.gnu.org>
Cc: Stefan Puiu <stefan.puiu@gmail.com>
Cc: Igor Sysoev <igor@sysoev.ru>
Cc: Rich Felker <dalias@libc.org>
Cc: Andrew Clayton <andrew@digital-domain.net>
Cc: Richard Biener <richard.guenther@gmail.com>
Cc: Zack Weinberg <zack@owlfolio.org>
Cc: Florian Weimer <fweimer@redhat.com>
Cc: Joseph Myers <joseph@codesourcery.com>
Cc: Jakub Jelinek <jakub@redhat.com>
Cc: Sam James <sam@gentoo.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agobuild-catman.mk: Use .set suffix for troff(1) output
Alejandro Colomar [Tue, 11 Apr 2023 20:13:00 +0000 (22:13 +0200)] 
build-catman.mk: Use .set suffix for troff(1) output

Suggested-by: Ralph Corderoy <ralph@inputplus.co.uk>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agoregex.3: Destandardeseify Match offsets
наб [Fri, 21 Apr 2023 13:29:43 +0000 (15:29 +0200)] 
regex.3: Destandardeseify Match offsets

This section reads like it were (and pretty much is) lifted from POSIX.
That's hard to read, because POSIX is horrendously verbose, as usual.

Instead, synopsise it into something less formal but more reasonable,
and describe the resulting range with a range instead of a paragraph.

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agoregex.3: Desoupify regerror() description
наб [Fri, 21 Apr 2023 12:03:47 +0000 (14:03 +0200)] 
regex.3: Desoupify regerror() description

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agoregex.3: SYNOPSIS: Remove superfluous comments
Alejandro Colomar [Fri, 21 Apr 2023 12:09:35 +0000 (14:09 +0200)] 
regex.3: SYNOPSIS: Remove superfluous comments

This has the benefit that we can use proportional-width fonts in the
SYNOPSIS without misalignment in the structures.

Cc: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Cc: Ralph Corderoy <ralph@inputplus.co.uk>
Cc: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agoregex.3: Further clarify the sole purpose of REG_NOSUB
наб [Fri, 21 Apr 2023 02:49:11 +0000 (04:49 +0200)] 
regex.3: Further clarify the sole purpose of REG_NOSUB

Link: <https://lore.kernel.org/linux-man/3459b2a0-6a07-40fc-1e66-db906c3f62ac@gmail.com/T/#mb50a957359e029c611d6e0b8f1b1a20101aae670>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agoregex.3: Finalise move of reg*.3type
наб [Fri, 21 Apr 2023 02:48:59 +0000 (04:48 +0200)] 
regex.3: Finalise move of reg*.3type

They're inextricably linked, not cross-referenced at all,
and not used anywhere else.

Now that they (realistically) exist to the reader, add a note
on how big nmatch can be; POSIX even says "The application developer
should note that there is probably no reason for using a value of
nmatch that is larger than preg−>re_nsub+1.".

Also remove the now-duplicate regmatch_t declaration.

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agoregex.3, regex_t.3type, regmatch_t.3type, regoff_t.3type: Move & link regex_t.3type...
наб [Fri, 21 Apr 2023 02:48:54 +0000 (04:48 +0200)] 
regex.3, regex_t.3type, regmatch_t.3type, regoff_t.3type: Move & link regex_t.3type into regex.3

Move-only commit.

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agodl_iterate_phdr.3: EXAMPLES: Alignment should match open parenthesis
Alejandro Colomar [Fri, 21 Apr 2023 09:37:42 +0000 (11:37 +0200)] 
dl_iterate_phdr.3: EXAMPLES: Alignment should match open parenthesis

Reported-by: checkpatch(1) (`make lint-c-checkpatch`)
Reported-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agoEXIT_SUCCESS.3const: EXAMPLES: Do not use assignment in if condition
Alejandro Colomar [Fri, 21 Apr 2023 09:29:12 +0000 (11:29 +0200)] 
EXIT_SUCCESS.3const: EXAMPLES: Do not use assignment in if condition

Reported-by: checkpatch(1) (`make lint-c-checkpatch`)
Reported-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agoregex.3: Desoupify regfree() description
наб [Fri, 21 Apr 2023 01:24:20 +0000 (03:24 +0200)] 
regex.3: Desoupify regfree() description

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agoregex.3: Improve REG_STARTEND
наб [Fri, 21 Apr 2023 00:39:47 +0000 (02:39 +0200)] 
regex.3: Improve REG_STARTEND

Explicitly spell out the ranges involved. The original wording always
confused me, but it's actually very sane.

Remove "this doesn't change R_NOTBOL & R_NEWLINE" ‒ so does it change
R_NOTEOL? No. That's weird and confusing.

String largeness doesn't matter, known-lengthness does.

Explicitly spell out the influence on returned matches
(relative to string, not start of range).

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agoregex.3: Desoupify regexec() description
наб [Thu, 20 Apr 2023 19:36:53 +0000 (21:36 +0200)] 
regex.3: Desoupify regexec() description

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agosyscall.2: Document ENOSYS error
Günther Noack [Thu, 20 Apr 2023 20:08:41 +0000 (22:08 +0200)] 
syscall.2: Document ENOSYS error

Link: <https://lore.kernel.org/linux-man/31ecebc5-1b97-b610-a097-f260ec4d4c8d@gmail.com/>
Suggested-by: Alejandro Colomar <alx@kernel.org>
Signed-off-by: Günther Noack <gnoack3000@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agoregex.3: SYNOPSIS: Add _Nullable qualifier to regerror()'s errbuf
Alejandro Colomar [Thu, 20 Apr 2023 16:54:13 +0000 (18:54 +0200)] 
regex.3: SYNOPSIS: Add _Nullable qualifier to regerror()'s errbuf

Passing NULL there means that the function returns the size needed for a
copy without actually copying (possibly useful before allocating a
buffer large enough).

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agoregex.3: Desoupify regcomp() description
наб [Thu, 20 Apr 2023 15:35:45 +0000 (17:35 +0200)] 
regex.3: Desoupify regcomp() description

Behold:
  regerror() is passed the error code, errcode, the pattern buffer,
  preg, a pointer to a character string buffer, errbuf, and the size
  of the string buffer, errbuf_size.

Absolute soup.  This reads to me like an ill-conceived copy from a very
early standard version.  It looks fine in source form but is horrific to
read as running text.

Instead, replace all of these with just the descriptions of what they do
with their arguments.  What the arguments are is very clearly noted in
big bold in the prototypes.

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agoregex.3: Fix subsection headings
наб [Thu, 20 Apr 2023 13:02:07 +0000 (15:02 +0200)] 
regex.3: Fix subsection headings

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agoregex.3: SYNOPSIS: Add _Nullable qualifier
Alejandro Colomar [Thu, 20 Apr 2023 13:31:22 +0000 (15:31 +0200)] 
regex.3: SYNOPSIS: Add _Nullable qualifier

Reported-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agoman*/: ffix, wfix
наб [Thu, 20 Apr 2023 12:12:11 +0000 (14:12 +0200)] 
man*/: ffix, wfix

Use "bitwise OR" instead of "bitwise-or" (with fonts).
No other pages spell it like this.

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agoregex.3: wfix
наб [Wed, 19 Apr 2023 23:23:32 +0000 (01:23 +0200)] 
regex.3: wfix

"Not in POSIX.2", so is it in POSIX.1-2008?  POSIX.1-2001?
(or any other combination of standards from this millenion
not mentioned on this page?)  It's not: just say POSIX.

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agoregex.3: ffix
наб [Wed, 19 Apr 2023 23:23:22 +0000 (01:23 +0200)] 
regex.3: ffix

We never bold POSIX, not even anywhere else on this page.

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agoregex.3: Note that pmatch is still used if REG_NOSUB if REG_STARTEND
наб [Wed, 19 Apr 2023 23:23:04 +0000 (01:23 +0200)] 
regex.3: Note that pmatch is still used if REG_NOSUB if REG_STARTEND

In the regexec() signature
  regmatch_t pmatch[restrict .nmatch],
is a simplification. It's actually
  regmatch_t pmatch[restrict
    ((.preg->flags & REG_NOSUB) ? 0 : .nmatch) ?:
     !!(.eflags & REG_STARTEND)],

But speccing that would be insane.

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agolandlock.7: Return instead of exit() if Landlock is unusable
Günther Noack [Wed, 19 Apr 2023 18:54:43 +0000 (20:54 +0200)] 
landlock.7: Return instead of exit() if Landlock is unusable

When following a best effort approach,
we should not fail when Landlock is unusable,
but we should fall back to doing nothing.

Link: <https://lore.kernel.org/linux-man/5d90e3b0-1577-7efd-03b8-f94b6e50fbc1@digikod.net/>
Suggested-by: Mickaël Salaün <mic@digikod.net>
Signed-off-by: Günther Noack <gnoack3000@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agolandlock.7: wfix: Error message wording in code example
Günther Noack [Wed, 19 Apr 2023 18:54:42 +0000 (20:54 +0200)] 
landlock.7: wfix: Error message wording in code example

Link: <https://lore.kernel.org/linux-man/5d90e3b0-1577-7efd-03b8-f94b6e50fbc1@digikod.net/>
Suggested-by: Mickaël Salaün <mic@digikod.net>
Signed-off-by: Günther Noack <gnoack3000@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agolandlock.7: Use LANDLOCK_* constants for compatibility table
Günther Noack [Wed, 19 Apr 2023 18:54:41 +0000 (20:54 +0200)] 
landlock.7: Use LANDLOCK_* constants for compatibility table

Link: <https://lore.kernel.org/linux-man/5d90e3b0-1577-7efd-03b8-f94b6e50fbc1@digikod.net/>
Cc: Mickaël Salaün <mic@digikod.net>
Signed-off-by: Günther Noack <gnoack3000@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agolandlock.7: Check syscall result with == -1 instead of <= 0
Günther Noack [Wed, 19 Apr 2023 18:54:40 +0000 (20:54 +0200)] 
landlock.7: Check syscall result with == -1 instead of <= 0

Link: <https://lore.kernel.org/linux-man/5d90e3b0-1577-7efd-03b8-f94b6e50fbc1@digikod.net/>
Reported-by: Mickaël Salaün <mic@digikod.net>
Signed-off-by: Günther Noack <gnoack3000@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agoman*/: ffix
Guillem Jover [Sun, 16 Apr 2023 23:19:16 +0000 (01:19 +0200)] 
man*/: ffix

Escape dashes on UUIDs, URLs, and file and package names.

Signed-off-by: Guillem Jover <guillem@hadrons.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agolandlock.7: Explain the best-effort fallback mechanism in the example
Günther Noack [Mon, 17 Apr 2023 17:25:13 +0000 (19:25 +0200)] 
landlock.7: Explain the best-effort fallback mechanism in the example

Signed-off-by: Günther Noack <gnoack3000@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agoINSTALL: Fix references to lib/ -> share/mk/
Alejandro Colomar [Mon, 17 Apr 2023 18:33:59 +0000 (20:33 +0200)] 
INSTALL: Fix references to lib/ -> share/mk/

Fixes: edaa12e6b ("*.mk: Move makefiles from lib/ to share/mk/")
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agoproc.5: tfix
Guillem Jover [Sun, 16 Apr 2023 23:35:52 +0000 (01:35 +0200)] 
proc.5: tfix

Use Ctrl-Alt-Del instead of ctrl-alt-del, as used in all other
instances.

Signed-off-by: Guillem Jover <guillem@hadrons.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agoproc.5: Document that /proc/PID/oom_adj is no longer present
Guillem Jover [Sun, 16 Apr 2023 23:35:51 +0000 (01:35 +0200)] 
proc.5: Document that /proc/PID/oom_adj is no longer present

See kernel commit 01dc52ebdf472f77cca623ca693ca24cfc0f1bbe.

Signed-off-by: Guillem Jover <guillem@hadrons.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agoproc.5: A process can increase its own /proc/PID/oom_adj setting
Guillem Jover [Sun, 16 Apr 2023 23:35:50 +0000 (01:35 +0200)] 
proc.5: A process can increase its own /proc/PID/oom_adj setting

See kernel commit 8fb4fc68ca391862b061b3d358a288ccf6abed39.

Signed-off-by: Guillem Jover <guillem@hadrons.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agoproc.5: Document exact /proc/PID/exe behavior on unlinked pathnames
Guillem Jover [Sun, 16 Apr 2023 23:35:49 +0000 (01:35 +0200)] 
proc.5: Document exact /proc/PID/exe behavior on unlinked pathnames

Add the space which gets appended before the "(deleted)" marker.

Signed-off-by: Guillem Jover <guillem@hadrons.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agoip.7: ffix
Alejandro Colomar [Fri, 14 Apr 2023 19:33:14 +0000 (21:33 +0200)] 
ip.7: ffix

Fixes: 51f5698d3ce9 "...: ffix: replace .sp by .PP"
Fixes: 6545cc56e02e "...: ffix"
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agoip.7: Add "Special and reserved addresses" section
Seth David Schoen [Fri, 14 Apr 2023 18:45:58 +0000 (11:45 -0700)] 
ip.7: Add "Special and reserved addresses" section

Break out the discussion of special and reserved IPv4 addresses into
a subsection, formatted as a pair of definition lists, and briefly
describing three cases in which Linux no longer treats addresses
specially, where other systems do or did.

Also add a specific example to the NOTES paragraph that discourages
the use of IP broadcasting, so people can more easily understand
what they are supposed to do instead.

Suggested-by: John Gilmore <gnu@toad.com>
Signed-off-by: Seth David Schoen <schoen@loyalty.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years ago*.mk, INSTALL: build-src-c: Optimize pipeline
Alejandro Colomar [Fri, 14 Apr 2023 15:22:05 +0000 (17:22 +0200)] 
*.mk, INSTALL: build-src-c: Optimize pipeline

Calling man(1) is slow.  Since we only need to format the page, calling
mandoc(1) is faster and simpler (we could also use groff(1), but
mandoc(1) is probably faster and simpler than groff(1) too).  This
brings times down ~3x in my system.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agosrc.mk: Optimize pipeline
Alejandro Colomar [Fri, 14 Apr 2023 15:12:30 +0000 (17:12 +0200)] 
src.mk: Optimize pipeline

This pipeline is run for every make(1) invokation, and it was very slow,
due to running a new sed(1) process for every manual page.  Remove the
while loop, and rewrite so that all the commands in the pipeline are
only run once.  This brings times down ~10x in my system, from 1.5 s, to
just 0.14 s.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agoresolv.conf.5: Add option no-aaaa
Lukas Javorsky [Wed, 12 Apr 2023 15:09:30 +0000 (15:09 +0000)] 
resolv.conf.5: Add option no-aaaa

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years ago*.mk: Move makefiles from lib/ to share/mk/
Alejandro Colomar [Fri, 14 Apr 2023 13:53:53 +0000 (15:53 +0200)] 
*.mk: Move makefiles from lib/ to share/mk/

According to the FHS, lib/ is for arch-dependent files, while share/ is
for arch-independent files.

While moving, create a more organized directory structure.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agobuild.mk: srcfix
Alejandro Colomar [Fri, 14 Apr 2023 13:17:49 +0000 (15:17 +0200)] 
build.mk: srcfix

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agoMakefile: help-variables: Make .PHONY
Alejandro Colomar [Fri, 14 Apr 2023 12:47:05 +0000 (14:47 +0200)] 
Makefile: help-variables: Make .PHONY

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agoMakefile: tfix
Alejandro Colomar [Wed, 12 Apr 2023 14:54:01 +0000 (16:54 +0200)] 
Makefile: tfix

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years ago*.mk: $Z: Support installing xz(1) compressed pages
Alejandro Colomar [Wed, 12 Apr 2023 14:53:32 +0000 (16:53 +0200)] 
*.mk: $Z: Support installing xz(1) compressed pages

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years ago*.mk: Add *FLAGS variables for compression commands
Alejandro Colomar [Wed, 12 Apr 2023 14:46:16 +0000 (16:46 +0200)] 
*.mk: Add *FLAGS variables for compression commands

Also, document the LZIP variable.

Fixes: 69ad95988f40 ("*.mk: dist, dist-lz: Create tarballs compressed with lzip(1)")
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years ago*.mk: $Z: Support installing lzip(1) compressed pages
Alejandro Colomar [Wed, 12 Apr 2023 12:43:00 +0000 (14:43 +0200)] 
*.mk: $Z: Support installing lzip(1) compressed pages

Suggested-by: Ralph Corderoy <ralph@inputplus.co.uk>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years ago*.mk: dist, dist-lz: Create tarballs compressed with lzip(1)
Alejandro Colomar [Wed, 12 Apr 2023 12:37:08 +0000 (14:37 +0200)] 
*.mk: dist, dist-lz: Create tarballs compressed with lzip(1)

Suggested-by: Ralph Corderoy <ralph@inputplus.co.uk>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agodist.mk, version.mk: Create reproducible tarballs man-pages-6.05-a1
Alejandro Colomar [Tue, 11 Apr 2023 20:33:44 +0000 (22:33 +0200)] 
dist.mk, version.mk: Create reproducible tarballs

Anyone can create a tarball from a release tag, and it should be
identical to the release tarball, so that the PGP signature made at the
release matches.  This is useful for distributors.

Suggested-by: Marcos Fouces <marcos@debian.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agofts.3: SYNOPSIS: Fix nullability
Alejandro Colomar [Tue, 11 Apr 2023 14:55:17 +0000 (16:55 +0200)] 
fts.3: SYNOPSIS: Fix nullability

Reported-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agofts.3: Note fts_open() behaviour with empty strings
наб [Tue, 11 Apr 2023 02:21:32 +0000 (04:21 +0200)] 
fts.3: Note fts_open() behaviour with empty strings

This is undocumented in BSD, too, and present in the original SCCS
check-in (5.1 (Berkeley) 12/30/89).

This is very surprising, since in most other cases FTS is rather quite
sane about error reporting, but /any/ empty string in the input vector
blows out the creation entirely.

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agodist.mk: dist: Don't pollute stderr unnecessarily
Alejandro Colomar [Tue, 11 Apr 2023 02:30:31 +0000 (04:30 +0200)] 
dist.mk: dist: Don't pollute stderr unnecessarily

When running 'make dist' from a tarball (so we don't have git), we'll
see tons of errors saying we're not in a git tree.  However, that's not
meaningful, because that command is a no-op in such a scenario: the
(date) placeholder is not there anymore to be replaced.  Let's hide the
errors, unless V=1.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agodist.mk: dist-bz2: Use a timestamp newer than the .tar
Alejandro Colomar [Tue, 11 Apr 2023 00:36:36 +0000 (02:36 +0200)] 
dist.mk: dist-bz2: Use a timestamp newer than the .tar

Otherwise, make(1) goes crazy.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agoRELEASE, dist.mk: Use make(1)'s -B to force recreation of the dist files
Alejandro Colomar [Tue, 11 Apr 2023 00:31:38 +0000 (02:31 +0200)] 
RELEASE, dist.mk: Use make(1)'s -B to force recreation of the dist files

Using FORCE unnecessarily restarts the entire build, even if we _know_
nothing changed.  That's boring.  Trust ourselves, and write the
commands in the RELEASE file as using '-B', to remind ourselves.
Forgetting to use -B will result in incorrect timestamps or versioning
in the distributed pages, so don't forget it ;).

While we're at it, let's also use -j4 directly, so I don't read the
paragraph reminding me to use -j _after_ I've already run it.  Let's
write -j4 instead of -j so that we don't crash some innocent's system.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agobpf-helpers.7: Refresh page (Linux 6.2)
Alejandro Colomar [Mon, 10 Apr 2023 23:21:10 +0000 (01:21 +0200)] 
bpf-helpers.7: Refresh page (Linux 6.2)

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agoscanf.3: srcfix
Alejandro Colomar [Mon, 10 Apr 2023 23:07:19 +0000 (01:07 +0200)] 
scanf.3: srcfix

That extra whitespace cuased issues to the Debian packaging tool that
autodetects the licenses from the SPDX header.

Cc: Marcos Fouces <marcos@debian.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agoCONTRIBUTING: Remove old links
Alejandro Colomar [Mon, 10 Apr 2023 16:37:20 +0000 (18:37 +0200)] 
CONTRIBUTING: Remove old links

I removed those pages from the website.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agoREADME: Reorganize, and add some info
Alejandro Colomar [Sun, 9 Apr 2023 23:55:02 +0000 (01:55 +0200)] 
README: Reorganize, and add some info

-  Add "History" section, with a link to aeb's website with
   man-pages-1.* tarballs.
-  Move "Maintainers" to a subsection in the new "History" section.
-  Organize "Versions" into subsections ("Tarballs", "Git", and
   "Online pages").
-  Add links to the cgit websites of the git repositories.
-  Add link to the PDF online man-pages book.
-  wsfix in mtk's entry.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agoREADME: See also: Add 'Downstream packages', and 'Related projects'
Alejandro Colomar [Sun, 9 Apr 2023 23:00:01 +0000 (01:00 +0200)] 
README: See also: Add 'Downstream packages', and 'Related projects'

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agoCONTRIBUTING: Add Linux API mailing list
Alejandro Colomar [Sun, 9 Apr 2023 21:58:52 +0000 (23:58 +0200)] 
CONTRIBUTING: Add Linux API mailing list

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agoerofs.5: Minor tweaks to наб's patch
Alejandro Colomar [Sun, 9 Apr 2023 23:50:15 +0000 (01:50 +0200)] 
erofs.5: Minor tweaks to наб's patch

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agofilesystems.5, erofs.5: add erofs documentation
наб [Sun, 9 Apr 2023 22:27:04 +0000 (00:27 +0200)] 
filesystems.5, erofs.5: add erofs documentation

Modelled after tmpfs(5) ‒ there's a listing of mount options, and a
summary of limitations.  The feature flags are described in mkfs.erofs,
and they're versioned and maintained upstream quite well there, so no
need to duplicate those, since you only care on image creation.

The real value add is the mount options, but I cannot figure out how
device_id and fsid interact with the system at large, so I just noted
they're there.

State as of Linux 6.3-rc5.

Also, remove explicit .TP indent in filesystems.5 since we're already
touching this hunk: all entries sans iso9660 and Reiserfs fall within
the default prevailing indent, so no need to specify a wide one.

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agodist.mk: dist, dist-bz2: Create tarballs compressed with bzip2(1)
Alejandro Colomar [Sun, 9 Apr 2023 11:22:52 +0000 (13:22 +0200)] 
dist.mk: dist, dist-bz2: Create tarballs compressed with bzip2(1)

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agoMakefile: help-variables: Document $CP command variable
Alejandro Colomar [Sun, 9 Apr 2023 11:06:27 +0000 (13:06 +0200)] 
Makefile: help-variables: Document $CP command variable

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years ago*.mk: $Z: Support installing bzip2 compressed pages
Alejandro Colomar [Sun, 9 Apr 2023 11:04:48 +0000 (13:04 +0200)] 
*.mk: $Z: Support installing bzip2 compressed pages

Gentoo currently installs pages compressed with this format.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2 years agoinstall-man.mk: tfix
Alejandro Colomar [Sat, 8 Apr 2023 22:49:19 +0000 (00:49 +0200)] 
install-man.mk: tfix

Signed-off-by: Alejandro Colomar <alx@kernel.org>