groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[BUG] man(7) page not showing footer


From: Alejandro Colomar
Subject: [BUG] man(7) page not showing footer
Date: Tue, 1 Nov 2022 15:16:23 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.0

Hi Branden!

Another bug.  This time in troff(1) it seems.

This is weird. I received a report about the page `core` [1]. I didn't even know from which section it was, so the first thing I do is:

```
$ whatis core
core (5)             - core dump file
CORE (3perl)         - Namespace for Perl's core routines
```

Okay, section 5, that little stranger to me. Let's open the page, and see if it's from the Linux man-pages or not:

```
$ man core | tail -n1
       dump(8)
$ man core | tail -n4
SEE ALSO
       bash(1),   coredumpctl(1),  gdb(1),  getrlimit(2),  mmap(2),  prctl(2),
       sigaction(2), elf(5), proc(5),  pthreads(7),  signal(7),  systemd-core‐
       dump(8)
```

What?  There's no footer!  Which page am I seeing?

```
$ man -w core
/usr/local/man/man5/core.5
```

/usr/local, that means it's likely from the Linux man-pages.

```
alx@asus5775:~/src/linux/man-pages/man-pages$ man ./man5/core.5 | tail -n1
       dump(8)
```

After inspect$ tbl man5/core.5 | eqn -Tutf8 | /usr/bin/troff -man -ww -Tutf8 -rLL=78n | grep unreleased
t(unreleased)
ion of the source code, there isn't anything weird that would change the footer. Let's check the system page (from the 6.01-1 Debian Sid package).

```
$ man /usr/share/man/man5/core.5.gz | tail -n1
       dump(8)
```

Same thing. Hmm. Then I decided to make the terminal smaller to have a nice email, and surprise. Now the terminal is 72 chars:

```
$ man ./man5/core.5 | tail -n1
Linux man‐pages (unreleased)    (date)                         core(5)
```

Since I know how the groff pipeline is working from the linting work on the man-pages makefile, I just run it manually. I notice that exactly '-rLL=78n' doesn't show the footer, but higher or lower values (77 or 79) do show the footer.

```
$ tbl ./man5/core.5 \
  | eqn -Tutf8 \
  | troff -man -ww -Tutf8 -rLL=78n \
  | grep unreleased;
$ tbl ./man5/core.5 \
  | eqn -Tutf8 \
  | troff -man -ww -Tutf8 -rLL=77n \
  | grep unreleased;
t(unreleased)
$ tbl ./man5/core.5 \
  | eqn -Tutf8 \
  | troff -man -ww -Tutf8 -rLL=79n \
  | grep unreleased;
t(unreleased)
```

I don't understand those codes to be able to reason the bog, though. That troff(1) is 1.23.0.

```
$ which -a troff
/usr/local/bin/troff
/usr/bin/troff
/bin/troff
$ troff --version
GNU troff (groff) version 1.23.0.rc1.2913-2756
$ /usr/bin/troff --version
GNU troff (groff) version 1.22.4
```

If I try to run with 1.22.4, I can't reproduce the bug:

```
$ tbl man5/core.5 \
  | eqn -Tutf8 \
  | /usr/bin/troff -man -ww -Tutf8 -rLL=78n \
  | grep unreleased;
t(unreleased)
```

And the same with other LL values.  I hope this helps to kill that bug :)

Cheers,

Alex


[1]: <https://bugzilla.kernel.org/show_bug.cgi?id=216648>
--
<http://www.alejandro-colomar.es/>

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]