Possibly malformed date in several manual pages

Alexander Best arundel at freebsd.org
Fri Jan 8 11:35:05 UTC 2021


On Do. Jan.  7 2021, Alexander Best wrote:
> Hi everyone,
> 
> while reading the VACATION(1) manual page I stumbled upon the following entry
> in the last line:
> 
> 	$Date: 2013-11-22 20:52:02 $
> 
> I then used "zcat `man -w vacation`|zgrep -n \$Date" to find the actual entry:

... either zcat OR zgrep would have been fine here ...
> 
> 	14:.TH VACATION 1 "$Date: 2013-11-22 20:52:02 $"
> 
> Looking at other manual pages such as CAT(1) via "zcat `man -w cat`|head -n 50"
> shows a different format:
> 
> 	.Dd January 29, 2013
> 
> Checking all the manual pages in /usr/share/man for the former format using
> the following command
> 
> 	$for i in `find /usr/share/man -type f`; do zgrep -l \$Date $i; done
> 
> revealed several entries:
> 
> /usr/share/man/man8/mailstats.8.gz
> /usr/share/man/man8/sendmail.8.gz
> /usr/share/man/man8/smrsh.8.gz
> /usr/share/man/man8/praliases.8.gz
> /usr/share/man/man8/purgestat.8.gz
> /usr/share/man/man8/editmap.8.gz
> /usr/share/man/man8/mail.local.8.gz
> /usr/share/man/man8/rmail.8.gz
> /usr/share/man/man8/makemap.8.gz
> /usr/share/man/man8/hoststat.8.gz
> /usr/share/man/man5/aliases.5.gz
> /usr/share/man/man1/mailq.1.gz
> /usr/share/man/man1/vacation.1.gz
> /usr/share/man/man1/dialog.1.gz
> /usr/share/man/man1/newaliases.1.gz
> /usr/share/man/man4/ubser.4.gz
> /usr/share/man/man3/dialog.3.gz
> 
> Looking at the MDOC(7) manual page implies, that mdoc doesn't understand
> the TH-Macro. Is this expected behaviour? Or should the TH-Entries be turned
> into DD-Entries? Or should the TH-Entries remain for historical reasons?

Hi everyone,

after some further digging, I think I found the answer. Most of the manual pages
above reside within /usr/src/contrib and use the older man-syntax (man(7))
instead of the mdoc-syntax (mdoc(7)). Since these manual pages are the result of
a vendor import to FreeBSD, it's not wise to change the manual pages, since this
will increase the delta once a new import occurs.

man(1) (or actually mdoc(7)) automatically detects whether man- or mdoc-syntax is
used within a manual page. From what I can see from the mdoc(7) manual, the
TH-macro conforms to the man-syntax:

".TH PROGNAME 1 1979-01-10"

"$Date:" and "$" in the vacation-example of course aren't pretty to have in a
manual page, but I crosschecked with Linux and here those terms are also
displayed at the end of the according manual page.

One might could take care of this during the installation process of the manual
pages, but it's probably not worth the hassle.

Kind regards,
Alexander

> 
> Kind regards,
> Alexander


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 931 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20210108/217e4e0c/attachment.sig>


More information about the freebsd-questions mailing list