]> git.ipfire.org Git - thirdparty/man-pages.git/log
thirdparty/man-pages.git
3 years agoepoll_create.2: HISTORYise "max_user_instances" EMFILE
наб [Sun, 16 Jul 2023 11:45:48 +0000 (13:45 +0200)] 
epoll_create.2: HISTORYise "max_user_instances" EMFILE

/proc/sys/fs/epoll/max_user_instances hasn't existed since
  commit 9df04e1f25effde823a600e755b51475d438f56b
  ("epoll: drop max_user_instances and rely only on max_user_watches")
from
  Date:   Thu Jan 29 14:25:26 2009 -0800
which describes to v2.6.29-rc3-24-g9df04e1f25ef.

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
3 years agoMakefile: Improve Makefile troubleshooting
Alejandro Colomar [Sun, 16 Jul 2023 03:41:37 +0000 (05:41 +0200)] 
Makefile: Improve Makefile troubleshooting

Add an empty double-colon rule that targets the makefiles, to instruct
make(1) to not remake makefiles.  This improves (considerably reduces)
the output of 'make -d'.

Suggested-by: Dmitry Goncharov <dgoncharov@users.sf.net>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
3 years agocrypt.3, encrypt.3: Fix library name and description
Xi Ruoyao [Sun, 16 Jul 2023 01:51:25 +0000 (09:51 +0800)] 
crypt.3, encrypt.3: Fix library name and description

libcrypt is the password hashing library, and libcrypto is a completely
different library (OpenSSL cryptography library).  While the encrypt()
function can "encrypt" things, it uses a broken algorithm so let's not
call libcrypt an "encryption" library at all.  In crypt.3, also replace
"encrypt" with "hash" except several places where it really means
"encrypt".

Signed-off-by: Xi Ruoyao <xry111@xry111.site>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
3 years agoman2/: Use SPDX-License-Identifier: Linux-man-pages-copyleft-var
Alejandro Colomar [Sun, 16 Jul 2023 01:51:59 +0000 (03:51 +0200)] 
man2/: Use SPDX-License-Identifier: Linux-man-pages-copyleft-var

Signed-off-by: Alejandro Colomar <alx@kernel.org>
3 years agoLICENSES/Linux-man-pages-copyleft-var.txt: Add license text
Alejandro Colomar [Sun, 16 Jul 2023 01:47:24 +0000 (03:47 +0200)] 
LICENSES/Linux-man-pages-copyleft-var.txt: Add license text

Signed-off-by: Alejandro Colomar <alx@kernel.org>
3 years agopipe.7: document read()s with O_NONBLOCK
наб [Sat, 15 Jul 2023 18:36:39 +0000 (20:36 +0200)] 
pipe.7: document read()s with O_NONBLOCK

Which don't behave like you may expect them to;
unprimed, I expected the natural extension of either:
files   (being a  filesystem object), always returning 0 if no data, or
sockets (being an IPC mechanism),     always EAGAINing   if no data.

The pipe semantics make sense of course ‒ pipes can be modelled as
sockets if there aren't writers, but files if there are; indeed,
this makes sense as the writer continuously appending a sliding
"window" over a file ‒ but they're unique amongst the UNIX file types,
but arriving at that specific interaction table is non-obvious,
especially to a user.

Quoth Issue 8 Draft 3:
60746  When attempting to read from an empty pipe or FIFO:
60747    • If no process has the pipe open for writing, read( ) shall return 0 to indicate end-of-file.
60748    • If some process has the pipe open for writing and O_NONBLOCK is set, read( ) shall return
60749      −1 and set errno to [EAGAIN].
60750    • If some process has the pipe open for writing and O_NONBLOCK is clear, read( ) shall
60751      block the calling thread until some data is written or the pipe is closed by all processes that
60752      had the pipe open for writing.

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
3 years agoman2/: Use SPDX-License-Identifier: Linux-man-pages-copyleft-2-para
Alejandro Colomar [Sat, 15 Jul 2023 17:15:06 +0000 (19:15 +0200)] 
man2/: Use SPDX-License-Identifier: Linux-man-pages-copyleft-2-para

Signed-off-by: Alejandro Colomar <alx@kernel.org>
3 years agoLICENSES/Linux-man-pages-copyleft-2-para.txt: Add license text
Alejandro Colomar [Sat, 15 Jul 2023 17:17:35 +0000 (19:17 +0200)] 
LICENSES/Linux-man-pages-copyleft-2-para.txt: Add license text

Signed-off-by: Alejandro Colomar <alx@kernel.org>
3 years agoman*/: Use SPDX-License-Identifier: Linux-man-pages-1-para
Alejandro Colomar [Sat, 15 Jul 2023 17:10:39 +0000 (19:10 +0200)] 
man*/: Use SPDX-License-Identifier: Linux-man-pages-1-para

Signed-off-by: Alejandro Colomar <alx@kernel.org>
3 years agoLICENSES/Linux-man-pages-1-para.txt: Add license text
Alejandro Colomar [Sat, 15 Jul 2023 17:11:28 +0000 (19:11 +0200)] 
LICENSES/Linux-man-pages-1-para.txt: Add license text

Signed-off-by: Alejandro Colomar <alx@kernel.org>
3 years ago.mailmap: Remove file
Alejandro Colomar [Sat, 15 Jul 2023 16:55:09 +0000 (18:55 +0200)] 
.mailmap: Remove file

It's unmaintainable.

Reported-by: Serge Hallyn <serge@hallyn.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
3 years agosocket.7: tfix
Eric Biggers [Fri, 14 Jul 2023 04:08:12 +0000 (21:08 -0700)] 
socket.7: tfix

Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
3 years agoprctl.2: tfix
Eric Biggers [Fri, 14 Jul 2023 04:05:17 +0000 (21:05 -0700)] 
prctl.2: tfix

Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
3 years agoman*/: Prefer off_t over off64_t for splice(2), etc.
Paul Eggert [Sun, 9 Jul 2023 06:07:55 +0000 (23:07 -0700)] 
man*/: Prefer off_t over off64_t for splice(2), etc.

For the few functions that come only in 64-bit off_t flavors,
document their APIs as using off_t instead of off64_t,
and say also that code should #define _FILE_OFFSET_BITS 64.
This documents what user code is (and should be) doing anyway,
if it needs to work on traditional x86 and ARM Linux.

Reported-by: Rich Felker <dalias@libc.org>
Fixes: 9bebb17e5b57 ("splice.2: Use 'off64_t' instead of 'loff_t'")
Fixes: 76c5631fb442 ("copy_file_range.2: Document glibc wrapper instead of kernel syscall")
Fixes: 5cabfa06b407 ("man-pages 1.68")
Fixes: 3ca974e3988a ("New page for sync_file_range(2), new in kernel 2.6.17.")
Fixes: 9bebb17e5b57 ("sync_file_range.2: Document the architecture-specific sync_file_range2() system call")
Fixes: 79bf8cdcf36a ("Document fopencookie(3), a library function that allows custom implementation of a stdio stream.")
Signed-off-by: Paul Eggert <eggert@cs.ucla.edu>
Reviewed-by: Sam James <sam@gentoo.org>
Cc: Jonathan Wakely <jwakely@redhat.com>
Cc: Szabolcs Nagy <nsz@port70.net>
Cc: Jakub Wilk <jwilk@jwilk.net>
Cc: A. Wilcox <AWilcox@wilcox-tech.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
3 years agodir_colors.5: Relicense page
Alejandro Colomar [Sat, 15 Jul 2023 13:56:54 +0000 (15:56 +0200)] 
dir_colors.5: Relicense page

On 2023-07-08 22:14, Martin (Joey) Schulze wrote:
> For the record,
>
> I would like to re-license dir_colors(5) under the GPLv2+
>
> Please adjust the manpage source accordingly.
>
> .\" Copyright (c) 2001 Martin Schulze <joey@infodrom.org>
> .\"
> .\" This is free documentation; you can redistribute it and/or
> .\" modify it under the terms of the GNU General Public License as
> .\" published by the Free Software Foundation; either version 2 of
> .\" the License, or (at your option) any later version.
> .\"
> .\" The GNU General Public License's references to "object code"
> .\" and "executables" are to be interpreted as the output of any
> .\" document formatting or typesetting system, including
> .\" intermediate and printed output.
> .\"
> .\" This manual is distributed in the hope that it will be useful,
> .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
> .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> .\" GNU General Public License for more details.
> .\"
> .\" You should have received a copy of the GNU General Public
> .\" License along with this manual; if not, write to the Free
> .\" Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
> .\" USA.
>
> This should help keep the manpage free and a version in Fedora.

Link: <https://gitlab.com/fedora/legal/fedora-license-data/-/issues/211>
Reported-by: Adam Dobes <adobes@redhat.com>
Cc: Brian Inglis <Brian.Inglis@Shaw.ca>
Cc: Martin (Joey) Schulze <joey@infodrom.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
3 years agostatvfs.3: note f_favail = f_ffree on Linux
наб [Sat, 8 Jul 2023 20:01:29 +0000 (22:01 +0200)] 
statvfs.3: note f_favail = f_ffree on Linux

Quoting myself from #musl:
01:59:40 hm, I think this was just invented for symmetry with bfree/bavail
02:00:46 FFS has minfree for space but nothing equivalent for inodes
02:32:31 (this is mirrored in ext4;
  a global grep over DragonFlyBSD and the illumos gate
  showed just NFSv3 forwarding from the server;
  OpenBSD always sets it to the same thing as f_ffree;
  oddly, NetBSD /does/ calculate it differently
  for LFS and FFS but due to queued writes or
  w/e not because of root reservation;
  and as expected a lot of "/* what to put in here? */"
                       and "// XXX same??")

Link: https://lore.kernel.org/linux-man/f54kudgblgk643u32tb6at4cd3kkzha6hslahv24szs4raroaz@ogivjbfdaqtb/t/#u
Cc: Tom Schwindl <schwindl@posteo.de>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
3 years agoisalpha.3: Move NOTES to CAVEATS, and clarify some Undefined Behavior
Alejandro Colomar [Mon, 5 Jun 2023 12:09:02 +0000 (14:09 +0200)] 
isalpha.3: Move NOTES to CAVEATS, and clarify some Undefined Behavior

Reported-by: Yedidyah Bar David <didi@redhat.com>
Acked-by: Sam James <sam@gentoo.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
3 years agoCONTRIBUTING, INSTALL, README, RELEASE: Reflow to 72 columns
Alejandro Colomar [Sat, 8 Jul 2023 18:28:14 +0000 (20:28 +0200)] 
CONTRIBUTING, INSTALL, README, RELEASE: Reflow to 72 columns

This makes it easier to quote in emails.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
3 years agoregex.3: ffix: "([^...])" is not an end of sentence
наб [Sat, 8 Jul 2023 03:11:30 +0000 (05:11 +0200)] 
regex.3: ffix: "([^...])" is not an end of sentence

Caused a double space before "not".

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Tested-by: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Cc: Tom Schwindl <schwindl@posteo.de>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
3 years agoip.7: Document IP_LOCAL_PORT_RANGE socket option
Jakub Sitnicki [Fri, 7 Jul 2023 14:17:39 +0000 (16:17 +0200)] 
ip.7: Document IP_LOCAL_PORT_RANGE socket option

Linux commit 91d0b78c5177 ("inet: Add IP_LOCAL_PORT_RANGE socket option")
introduced a new socket option available for AF_INET and AF_INET6 sockets.

Option is available starting from Linux 6.3. Document it.

Reviewed-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: Jakub Sitnicki <jakub@cloudflare.com>
[alx: semantic newlines]
Signed-off-by: Alejandro Colomar <alx@kernel.org>
3 years agoproc.5: Clarify that boot arguments can be embedded in image
Paul E. McKenney [Fri, 30 Jun 2023 23:33:28 +0000 (16:33 -0700)] 
proc.5: Clarify that boot arguments can be embedded in image

With the advent of the CONFIG_BOOT_CONFIG Kconfig option, kernel boot
arguments can now be embedded in the kernel image, either attached
to the end of initramfs or embedded in the kernel itself.  Document
this possibility in the /proc/cmdline entry of proc.5.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Cc: Michael Kerrisk <mtk.manpages@gmail.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Nick Desaulniers <ndesaulniers@google.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Reviewed-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
3 years agolandlock_add_rule.2: tfix
Günther Noack [Tue, 4 Jul 2023 07:59:34 +0000 (09:59 +0200)] 
landlock_add_rule.2: tfix

Signed-off-by: Alejandro Colomar <alx@kernel.org>
3 years agofanotify_init.2: remove empty pre-header line
наб [Mon, 3 Jul 2023 14:43:18 +0000 (16:43 +0200)] 
fanotify_init.2: remove empty pre-header line

Which yields an empty line in the formatted output.

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Fixes: e9f14fa0bbc1 ("fanotify.7, fanotify_init.2: Document FAN_REPORT_DIR_FID")
Signed-off-by: Alejandro Colomar <alx@kernel.org>
3 years agoinotify.7: wds are in the range [1, INT_MAX], not [0,
наб [Sat, 1 Jul 2023 23:41:17 +0000 (01:41 +0200)] 
inotify.7: wds are in the range [1, INT_MAX], not [0,

Naturally, the first inotify_add_watch() returns 1,
but also fs/notify/inotify.c:inotify_add_to_idr() allocates them with
  idr_alloc_cyclic(idr, i_mark, start=1, end=0, GFP_NOWAIT);
(start inclusive, end exclusive).

(From SYSCALL_DEFINE3(inotify_add_watch, ...),
 from inotify_update_watch(),
 from inotify_new_watch()).

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
3 years agoepoll_event.3type: epoll_ctl is (2)
наб [Wed, 28 Jun 2023 19:03:45 +0000 (21:03 +0200)] 
epoll_event.3type: epoll_ctl is (2)

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
3 years agoprctl.2: Document PR_GET_AUXV
Josh Triplett [Wed, 28 Jun 2023 18:27:56 +0000 (11:27 -0700)] 
prctl.2: Document PR_GET_AUXV

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
3 years agopoll.2: explicitly say what happens for regular files &c.
наб [Sat, 24 Jun 2023 12:13:29 +0000 (14:13 +0200)] 
poll.2: explicitly say what happens for regular files &c.

Naively, one may consider being "ready" to mean, for example,
  lseek(0, 0, SEEK_END); poll({.fd = 0, .events = POLLIN}, 0);
to be able to say whether new data has appeared at the end of the file.

This is not the case, and poll() is only meaningful as
"will a read or a write sleep": regular files and block devices are
always ready to return an empty read in this case, for example,
and you need to use inotify to achieve this.

Under Linux this is governed by DEFAULT_POLLMASK
  (EPOLLIN | EPOLLOUT | EPOLLRDNORM | EPOLLWRNORM)
being returned if no explicit poll operation is defined for the file.

As contrast, unpollables like the above are refused by epoll_ctl(ADD).

I explicitly hit the two keywords I searched for (regular, block)
before just writing a test program to confirm that poll() behaved as
expected and is not a good fit for my use-case.

This behaviour is guaranteed by POSIX (Issue 8 Draft 3):
51381  The poll( ) and ppoll( ) functions shall support regular files, terminal and pseudo-terminal
51382  devices, FIFOs, pipes, and sockets. The behavior of poll( ) and ppoll( ) on elements of fds that refer
51383  to other types of file is unspecified.

51384  Regular files shall always poll TRUE for reading and writing.

51385  A file descriptor for a socket that is listening for connections shall indicate that it is ready for
51386  reading, once connections are available. A file descriptor for a socket that is connecting
51387  asynchronously shall indicate that it is ready for writing, once a connection has been established.

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
3 years agomemchr.3: rawmemchr doesn't have an n parameter
наб [Fri, 23 Jun 2023 16:54:37 +0000 (18:54 +0200)] 
memchr.3: rawmemchr doesn't have an n parameter

The /point/ is it's unbounded;
  git grep -F 'void "' | grep -F '[]'
didn't return anything so I reverted it to a void*.

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Fixes: c64cd13e0025 ("Various pages: SYNOPSIS: Use VLA syntax in 'void *' function parameters")
Signed-off-by: Alejandro Colomar <alx@kernel.org>
3 years agoboot.7: LILO is not used often anymore
Alejandro Colomar [Sat, 8 Jul 2023 15:34:30 +0000 (17:34 +0200)] 
boot.7: LILO is not used often anymore

On 6/18/23 22:05, Oskari Pirhonen wrote:
> On Sat, Jun 17, 2023 at 13:11:29 +0200, Helge Kreutzmann wrote:
>> Hello Alejandro,
>> On Sun, Mar 12, 2023 at 12:31:37AM +0100, Alejandro Colomar wrote:
>>> On 3/11/23 18:13, Helge Kreutzmann wrote:
>>>> Without further ado, the following was found:
>>>>
>>>> Issue:    This is true only on x86 and Lilo is probably not much
>>>>           used anymore; also systemd has its own (?) bootloader
>>
>> Lilo has just been removed from Debian, so to my knowledge only
>> Mageia ships it.
>>
>
> FWIW, Gentoo still has LILO in the repos.  This doesn't change the
> fact that it probably does not see much use anymore.  Definitely not
> enough to warrant being mentioned as "is often".  Maybe a historical
> note, if anything.

Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Reported-by: Oskari Pirhonen <xxc3ncoredxx@gmail.com>
Cc: Mario Blaettermann <mario.blaettermann@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
3 years agomalloc.3: write about another possible reason for ENOMEM
Masatake YAMATO [Sat, 6 May 2023 17:37:19 +0000 (02:37 +0900)] 
malloc.3: write about another possible reason for ENOMEM

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
3 years agostatx.2: Fix Linux version
Alejandro Colomar [Wed, 31 May 2023 22:00:54 +0000 (00:00 +0200)] 
statx.2: Fix Linux version

$ git describe --contains 80340fe3
v5.8-rc1~203^2~4

Fixes: 4ca216bacc7d ("statx.2: Document STAT_ATTR_MOUNT_ROOT")
Reported-by: Yang Xu <xuyang2018.jy@fujitsu.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
3 years agounshare.2: ffix: indentation inconsistencies
Günther Noack [Fri, 26 May 2023 08:41:01 +0000 (10:41 +0200)] 
unshare.2: ffix: indentation inconsistencies

Signed-off-by: Günther Noack <gnoack@google.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
3 years agomalloc.3: srcfix
Jakub Wilk [Fri, 26 May 2023 14:53:28 +0000 (16:53 +0200)] 
malloc.3: srcfix

Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
3 years agoddp.7: Relicense to Linux-man-pages-copyleft
Alejandro Colomar [Fri, 26 May 2023 14:15:48 +0000 (16:15 +0200)] 
ddp.7: Relicense to Linux-man-pages-copyleft

Alan Cox gave me explicit permission to relicense it for consistency
with the rest of the project.

Cc: Alan Cox <alan@llwyncelyn.cymru>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
3 years agoproc.5: Clarify the format of /proc/$PID/cmdline
Günther Noack [Wed, 24 May 2023 14:33:07 +0000 (16:33 +0200)] 
proc.5: Clarify the format of /proc/$PID/cmdline

It is possible to produce /proc/$PID/cmdline files which do not follow
the NUL-seperated format, by using the tricks described in the
paragraph below.

Signed-off-by: Günther Noack <gnoack@google.com>
[ fix semantic newlines ]
Signed-off-by: Alejandro Colomar <alx@kernel.org>
3 years agoList a fifth condition when iconv(3) may stop.
Bruno Haible [Sun, 21 May 2023 11:05:29 +0000 (13:05 +0200)] 
List a fifth condition when iconv(3) may stop.

The wording regarding transliteration is vague, because this man page is not
the right place for going into the details of the transliteration.
Here are the details:
GNU libc and GNU libiconv support transliteration, for example, of "½" to "1/2",
or of "å" to "aa" in a Danish locale. The transliteration maps a multibyte
character of the input encoding to zero or more characters in the output.
There are two kinds of transliteration rules:
  - Those that are valid regardless of locale. Typically this means that the
    original and the transliterated character have similar glyphs, such as
    in the case "½" to "1/2".
    In GNU libc, these are collected in the files
    glibc/localedata/locales/translit_*.
  - Those that are valid in a single locale only. Often such a rule
    reflects similar pronounciation of the original and the transliterated
    characters. Some locales have script-based transliteration, for example
    from the Cyrillic script to the Latin script.
    In GNU libc, these are collected in the file
    glibc/localedata/locales/<locale>.
    In GNU libiconv, transliterations of this kind are not supported.

Link: https://sourceware.org/bugzilla/show_bug.cgi?id=29913#c4
Link: https://bugzilla.kernel.org/show_bug.cgi?id=217059
Reported-by: Steffen Nurpmeso <steffen@sdaoden.eu>
Reported-by: Reuben Thomas <rrt@sc3d.org>
Signed-off-by: Bruno Haible <bruno@clisp.org>
[ fix semantic newlines ]
Signed-off-by: Alejandro Colomar <alx@kernel.org>
3 years agostatx.2: Document STAT_ATTR_MOUNT_ROOT
Yang Xu [Tue, 23 May 2023 05:17:15 +0000 (13:17 +0800)] 
statx.2: Document STAT_ATTR_MOUNT_ROOT

Linux 5.10 adds STATX_ATTR_MOUNT_ROOT support.
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=80340fe3605c

Add the text to the statx man page.

Signed-off-by: Yang Xu <xuyang2018.jy@fujitsu.com>
[ alx: ffix ]
Signed-off-by: Alejandro Colomar <alx@kernel.org>
3 years agoputenv.3: tfix
наб [Tue, 23 May 2023 20:58:52 +0000 (22:58 +0200)] 
putenv.3: tfix

Fixes: commit b324e17d3208c940622ab192609b836928d5aa8d ("Many pages: wfix")
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
3 years agoputenv.3: Originated in SysVr2; in 4.3BSD-Reno; fixed on modern systems
наб [Tue, 23 May 2023 20:17:31 +0000 (22:17 +0200)] 
putenv.3: Originated in SysVr2; in 4.3BSD-Reno; fixed on modern systems

Fixed in:
  NetBSD 6     src lib/libc/stdlib/putenv.c 1.13
  FreeBSD 7    putenv(3) says so
  OpenBSD 4.6  src lib/libc/stdlib/setenv.c 1.10
and is correct under current(?) MacOS as well

The current wording implies that all of 4.4BSD's descenants also carry
this bug (at least it did to me): they did until like 2009 but they're
fine now

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
3 years agobash_aliases: Increase robustness of sed_rm_ccomments()
Alejandro Colomar [Tue, 23 May 2023 14:29:34 +0000 (16:29 +0200)] 
bash_aliases: Increase robustness of sed_rm_ccomments()

Thanks to perl(1), we can use a non-greedy match to remove several
C89-style comments in the same line.  And by splitting (and slightly
modifying) the other sed(1) call, we can handle multi-line comments that
start in the same line that the previous one ends.

Now the only remaining issue is nested comments, but that's rare, so
let's ignore it for now.

$ cat com.c
/* let's see */ int foo/*how about here?*/; // meh
int bar; /* Let's see
how this
behaves */ int baz; /* like this?
like that! */ int qwe; // asdasd

$ sed_rm_ccomments <com.c
 int foo;
int bar;
 int baz;
 int qwe;

Here's what can and will be problematic:

// /*
int foo;
/* */

Signed-off-by: Alejandro Colomar <alx@kernel.org>
3 years ago.mailmap: Add Serge Hallyn
Alejandro Colomar [Sat, 20 May 2023 12:43:51 +0000 (14:43 +0200)] 
.mailmap: Add Serge Hallyn

Signed-off-by: Alejandro Colomar <alx@kernel.org>
3 years ago.mailmap: Add Andrew Clayton
Alejandro Colomar [Sat, 20 May 2023 12:38:18 +0000 (14:38 +0200)] 
.mailmap: Add Andrew Clayton

Signed-off-by: Alejandro Colomar <alx@kernel.org>
3 years ago.mailmap: Add Ingo Schwarze
Alejandro Colomar [Sat, 20 May 2023 12:35:45 +0000 (14:35 +0200)] 
.mailmap: Add Ingo Schwarze

Signed-off-by: Alejandro Colomar <alx@kernel.org>
3 years agoopen.2, prctl.2: SYNOPSIS: Document these as variadic functions
Alejandro Colomar [Fri, 19 May 2023 13:02:16 +0000 (15:02 +0200)] 
open.2, prctl.2: SYNOPSIS: Document these as variadic functions

I remember I discussed this with Michael Kerrisk a long ago and we
agreed to apply this fix, as I felt that using overload syntax was
confusing (especially since C doesn't allow overloads), but then I
didn't feel urged to write a patch.  Florian confirmed recently that
this is confusing to more programmers, so let's do it.

Link: <https://bugzilla.kernel.org/show_bug.cgi?id=216876#c1>
Reported-by: Florian Weimer <fweimer@redhat.com>
Cc: Michael Kerrisk <mtk.manpages@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
3 years agoposix_memalign.3: Update aligned_alloc(3) to match C17
DJ Delorie [Tue, 9 May 2023 00:43:35 +0000 (20:43 -0400)] 
posix_memalign.3: Update aligned_alloc(3) to match C17

Link: <https://sourceware.org/pipermail/libc-alpha/2023-May/147810.html>
Link: <https://patchwork.sourceware.org/project/glibc/patch/33ec9e0c1e587813b90e8aa771c2c8e6e379dd48.camel@posteo.net/>
Link: <https://lore.kernel.org/linux-man/d79b505c-5b19-331c-5b25-d40adc9cc843@wanadoo.fr/>
Cc: John Scott <jscott@posteo.net>
Cc: Paul Floyd <pjfloyd@wanadoo.fr>
Signed-off-by: DJ Delorie <dj@redhat.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
3 years agosystem_data_types.7: tfix
Eric Wong [Fri, 19 May 2023 10:26:43 +0000 (10:26 +0000)] 
system_data_types.7: tfix

The actual field names omit the 'g', matching sigevent.7.

Signed-off-by: Eric Wong <e@80x24.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
3 years ago.mailmap: Add Bruno Haible
Alejandro Colomar [Fri, 19 May 2023 12:06:40 +0000 (14:06 +0200)] 
.mailmap: Add Bruno Haible

Signed-off-by: Alejandro Colomar <alx@kernel.org>
3 years agoREADME: tfix
Alejandro Colomar [Fri, 19 May 2023 08:42:10 +0000 (10:42 +0200)] 
README: tfix

Signed-off-by: Alejandro Colomar <alx@kernel.org>
3 years agofflush.3, unlocked_stdio.3: SYNOPSIS: The streams can be null
Alejandro Colomar [Thu, 18 May 2023 18:53:14 +0000 (20:53 +0200)] 
fflush.3, unlocked_stdio.3: SYNOPSIS: The streams can be null

Cc: Xi Ruoyao <xry111@xry111.site>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
3 years ago*.mk: Use -wbreak in TROFFFLAGS, and -ww in NROFFFLAGS
Alejandro Colomar [Tue, 9 May 2023 11:25:01 +0000 (13:25 +0200)] 
*.mk: Use -wbreak in TROFFFLAGS, and -ww in NROFFFLAGS

We don't need to see all warnings everywhere we call troff(1).  Instead,
put all warnings in nroff mode, which we only run for the warnings, and
then only ask for warnings that depend on the output in other
invocations of troff(1).

-wbreak happens to enable only and all so-called "output warnings".  It
is an implementation detail of groff(1), but that's the best we can do
now.  If groff(1) changes their warnings organization, we'll need to
adapt to it.

Link: <https://lists.gnu.org/archive/html/groff/2023-05/msg00046.html>
Cc: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
3 years agombind.2: Clarify MPOL_MF_MOVE with MPOL_INTERLEAVE policy
Mike Kravetz [Fri, 5 May 2023 19:48:58 +0000 (12:48 -0700)] 
mbind.2: Clarify MPOL_MF_MOVE with MPOL_INTERLEAVE policy

There was user confusion about specifying MPOL_MF_MOVE* with
MPOL_INTERLEAVE policy [1].  Add clarification.

[1] https://lore.kernel.org/linux-mm/20230501185836.GA85110@monkey/

Signed-off-by: Mike Kravetz <mike.kravetz@oracle.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
3 years agoresolv.conf.5: tfix
Jakub Wilk [Wed, 3 May 2023 15:57:38 +0000 (17:57 +0200)] 
resolv.conf.5: tfix

Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
3 years agosched_yield.2: Rename NOTES to CAVEATS, and reorder contents
Alejandro Colomar [Wed, 3 May 2023 16:47:27 +0000 (18:47 +0200)] 
sched_yield.2: Rename NOTES to CAVEATS, and reorder contents

Put the last paragraph at the top of the CAVEATS section, since it's
probably the most important for readers.  This system call is likely not
the right one for most programs; let's discourage its use.

Link: <https://www.realworldtech.com/forum/?threadid=189711&curpostid=189752>
Cc: Andrew Clayton <a.clayton@nginx.com>
Signed-off-by: Alejandro Colomar <alx@nginx.com>
3 years agosched_yield.2: NOTES: Remove misleading sentence
Alejandro Colomar [Wed, 3 May 2023 16:26:12 +0000 (18:26 +0200)] 
sched_yield.2: NOTES: Remove misleading sentence

sched_yield(2) is not the right thing for heavily contended resources.
The right thing to do is to call functions that wake the waiting threads.

Link: <https://www.realworldtech.com/forum/?threadid=189711&curpostid=189752>
Cc: Andrew Clayton <a.clayton@nginx.com>
Signed-off-by: Alejandro Colomar <alx@nginx.com>
3 years agosched_yield.2: HISTORY: POSIX.1-2008 makes this non-optional
Alejandro Colomar [Wed, 3 May 2023 16:19:00 +0000 (18:19 +0200)] 
sched_yield.2: HISTORY: POSIX.1-2008 makes this non-optional

Signed-off-by: Alejandro Colomar <alx@kernel.org>
3 years agomalloc.3: SYNOPSIS: Add the _Nullable qualifier
Alejandro Colomar [Wed, 3 May 2023 00:04:11 +0000 (02:04 +0200)] 
malloc.3: SYNOPSIS: Add the _Nullable qualifier

These functions accept NULL.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
3 years agomalloc.3: ffix
Alejandro Colomar [Wed, 3 May 2023 00:03:04 +0000 (02:03 +0200)] 
malloc.3: ffix

Signed-off-by: Alejandro Colomar <alx@kernel.org>
3 years agoman*/, man.ignore.grep: srcfix; warn about blank lines
Alejandro Colomar [Tue, 2 May 2023 22:48:14 +0000 (00:48 +0200)] 
man*/, man.ignore.grep: srcfix; warn about blank lines

-  Use the dummy character to avoid warnings in examples.
-  Re-enable the warning.

Suggested-by: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
3 years ago*.mk, *.grep: Move grep patterns to .grep files
Alejandro Colomar [Mon, 1 May 2023 23:56:52 +0000 (01:56 +0200)] 
*.mk, *.grep: Move grep patterns to .grep files

This simplifies the makefiles, and has the benefit that we can edit them
without editing the makefile (thus without causing unnecessary rebuilds).

Suggested-by: Bjarni Ingi Gislason <bjarniig@simnet.is>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
3 years agoascii.7: ffix
Alejandro Colomar [Mon, 1 May 2023 23:03:01 +0000 (01:03 +0200)] 
ascii.7: ffix

Simplify formatting of ASCII tables.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
3 years agouri.7: ffix
Alejandro Colomar [Sat, 29 Apr 2023 19:46:13 +0000 (21:46 +0200)] 
uri.7: ffix

Reported-by: groff(1) (`make build-catman-troff`)
Cowritten-by: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
3 years agoman*/: srcfix
Alejandro Colomar [Sat, 29 Apr 2023 18:25:44 +0000 (20:25 +0200)] 
man*/: srcfix

Reported-by: groff(1) (`make build-catman-troff`)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
3 years agoman*/: ffix
Alejandro Colomar [Sat, 29 Apr 2023 18:19:20 +0000 (20:19 +0200)] 
man*/: ffix

Reported-by: groff(1) (`make built-catman-troff`)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
3 years ago*.mk: build-catman-troff: Silence warnings about using UC
Alejandro Colomar [Sat, 29 Apr 2023 18:24:01 +0000 (20:24 +0200)] 
*.mk: build-catman-troff: Silence warnings about using UC

We have some pages that come from UCB, and therefore need that macro.
It's not like we're going to accidentally use that macro, so let's
ignore the warning.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
3 years ago*.mk: build-catman-troff: Silence warnings about using PD
Alejandro Colomar [Sat, 29 Apr 2023 18:12:37 +0000 (20:12 +0200)] 
*.mk: build-catman-troff: Silence warnings about using PD

It's the best tool for certain purposes (at least, so far).

Signed-off-by: Alejandro Colomar <alx@kernel.org>
3 years ago*.mk: build-catman-troff: Silence warnings about blank lines in input
Alejandro Colomar [Sat, 29 Apr 2023 18:09:27 +0000 (20:09 +0200)] 
*.mk: build-catman-troff: Silence warnings about blank lines in input

Ideally, we want this warning, but it has false positives in the example
programs, so let's disable it for now.  Hopefully, groff will split
those two, and then we'll be able to re-enable the one we want.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
3 years ago*.mk: install-man: Ignore pages in non-standard source MANDIRS
Alejandro Colomar [Sat, 29 Apr 2023 18:05:40 +0000 (20:05 +0200)] 
*.mk: install-man: Ignore pages in non-standard source MANDIRS

Signed-off-by: Alejandro Colomar <alx@kernel.org>
3 years ago*.mk: build-catman-troff: Silence warnings about missing fifth argument
Alejandro Colomar [Sat, 29 Apr 2023 17:54:49 +0000 (19:54 +0200)] 
*.mk: build-catman-troff: Silence warnings about missing fifth argument

This happens when the second argument is a subsection, and the warning
is right because the page ends up with no section title, but let's
forget about it for now.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
3 years ago*.mk: Allow non-standard source MANDIRS
Alejandro Colomar [Sat, 29 Apr 2023 17:29:50 +0000 (19:29 +0200)] 
*.mk: Allow non-standard source MANDIRS

Some projects don't store their source manual pages in a directory
structure resembling $MANPATH.  Allow such a directory structure so that
we can for example lint groff's source manual pages:

$ make check lint MANDIR=~/src/gnu/groff;

Signed-off-by: Alejandro Colomar <alx@kernel.org>
3 years ago*.mk: Don't rmdir
Alejandro Colomar [Sat, 29 Apr 2023 17:09:16 +0000 (19:09 +0200)] 
*.mk: Don't rmdir

There's no need; we can leave empty dirs on 'make uninstall', and it
allows some simplifications.  We don't need the FORCE target anymore,
and don't need some directory variables either.  While at it, I found
some unused variable that should have been removed a long time ago:
$installdirs_manX

Signed-off-by: Alejandro Colomar <alx@kernel.org>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>