Bug 25735 - broken groff patch causes blank man pages
Bug#: 25735 Product:  Gentoo Linux Version: unspecified Platform: All
OS/Version: All Status: RESOLVED Severity: normal Priority: P2
Resolution: FIXED Assigned To: azarah@gentoo.org Reported By: splite-gentoo@sigint.cs.purdue.edu
Component: Core system
URL: 
Summary: broken groff patch causes blank man pages
Keywords:  
Status Whiteboard: 
Opened: 2003-08-01 17:02 0000
Description:   Opened: 2003-08-01 17:02 0000
The groff patch "groff-man-UTF-8.diff" inserts a trailing blank line into
/usr/share/groff/site-tmac/man.local that causes "man -t" to output an initial
blank page.  Royally screws duplex printing.  Patch to the patch attached.

Reproducible: Always
Steps to Reproduce:
1.
2.
3.

------- Comment #1 From splite 2003-08-01 17:04:28 0000 -------
Created an attachment (id=15346) [details]
patch to sys-apps/groff/files/groff-man-UTF-8.diff

------- Comment #2 From Martin Schlemmer (RETIRED) 2003-08-02 08:51:34 0000 -------
What is the issue here ?  Could you do a 'man -t man &> foo' and attach
foo ?

------- Comment #3 From splite 2003-08-02 15:52:02 0000 -------
Sure.  When you run that command, then run your favorite PostScript viewer  
on foo, do you not see a blank page 1, followed by the real page 1?
 
The issue is the blank line at the bottom of 
/usr/share/groff/site-tmac/man.local.  Since it's not part of a macro,
*roff sees it as part of the document and outputs a "blank" (actually 
contains a single newline) page 1.  Also screws up the footer macro, as
.TH hasn't been run yet:
 
% zcat /usr/man/man1/pwd.1.gz | troff -b -ww -man-old > /dev/null
/usr/share/groff/1.18.1/tmac/an-old.tmac:251: backtrace: trap-invoked macro `an-
p-footer'
/usr/share/groff/1.18.1/tmac/an-old.tmac:217: backtrace: trap-invoked macro `an-footer'
/usr/share/groff/1.18.1/tmac/an-old.tmac:160: backtrace: macro `TH'
<standard input>:2: warning: `an-extra2' not defined
/usr/share/groff/1.18.1/tmac/an-old.tmac:251: backtrace: trap-invoked macro `an-p-footer'
/usr/share/groff/1.18.1/tmac/an-old.tmac:217: backtrace: trap-invoked macro `an-footer'
/usr/share/groff/1.18.1/tmac/an-old.tmac:160: backtrace: macro `TH'
<standard input>:2: warning: `an-extra1' not defined
 
Remove the blank line and the warnings and extra page go away.

------- Comment #4 From splite 2003-08-02 15:53:21 0000 -------
Created an attachment (id=15397) [details]
output of "man -t man > /tmp/groffbug"

No stderr output.

------- Comment #5 From Martin Schlemmer (RETIRED) 2003-08-04 12:02:31 0000 -------
Fixed in -r3, thanks.