NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: misc/59655: man pages report incorrect OS version when running later kernel
The following reply was made to PR misc/59655; it has been noted by GNATS.
From: Kimmo Suominen <kim%netbsd.org@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc:
Subject: Re: misc/59655: man pages report incorrect OS version when running
later kernel
Date: Sun, 14 Sep 2025 23:27:14 +0300
On Sun, Sep 14, 2025 at 04:20:00PM +0000, rwhitlock22%gmail.com@localhost wrote:
> If update your kernel so that you are running a kernel that is newer
> than your userland then many man pages report an incorrect OS version
> for the OS that they were from. For instance, printf(3) reports that
> it is from version 11.99.2 if your kernel is 11.99.2, even though
> printf comes from libc, which is a userland library, and so should
> correspond to the version of the userland that was installed.
>
> This seems to be because the man pages use the .Os directive with no
> further arguments to denote the OS version, which presumably uses the
> version of the kernel.
This is just a symptom of how mandoc(1) is computing the default value
for the Os macro using uname(3).
https://github.com/NetBSD/src/blob/6cee2c5b88e06440257c4c8ad704f388954c9fb0/external/bsd/mdocml/dist/mdoc_validate.c#L2892
For nroff/troff the default value is part of the macro definitions, and
is not affected by the return value of uname(3).
https://github.com/NetBSD/src/blob/6cee2c5b88e06440257c4c8ad704f388954c9fb0/external/gpl2/groff/tmac/mdoc.local#L46
So in my opinion, this is not an issue with the manual pages themselves
but rather with mandoc(1).
Maybe the default value for Os should be definable in man.conf(5).
In any case, this is not really a bug, but rather "works as designed".
Proposals for changing the behaviour are probably best addressed on one
of the many mailing lists.
Kind regards,
+ Kimmo
Home |
Main Index |
Thread Index |
Old Index