bugGNU troff - Bugs: bug #56221, groffer does not support...


bug #56221: groffer does not support colon-specific values in MANPATH

Submitted by:  None
Submitted on:  Fri 26 Apr 2019 05:59:17 AM UTC  
Category:  None Severity:  1 - Wish
Item Group:  New feature Status:  Wont Fix
Privacy:  Public Assigned to:  None
Open/Closed:  Closed Planned Release:  None

Add a New Comment (Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Fri 08 May 2020 09:48:20 AM UTC, comment #2: 

comment #1:

> groffer(1) ought to be completely deleted from the groff tree.

This was done in commit 1d2df80a, mooting this bug report.

Dave <barx>
Project Member
Fri 26 Apr 2019 12:19:35 PM UTC, comment #1: 

There are operating systems that support the MANPATH environment variable (including the special behaviour of double and trailing colons that you describe) but that do not have the manpath(1) utility and where it makes no sense to compile and install a manpath(1) utility by hand.  Consequently, portable software like groff cannot use the manpath(1) utility.

Then again, the overall code quality and software architecture quality of groffer(1) are so low that it is very probably already non-portable in various respects.  Even though i do regular cross-platform testing of groff (both from git and for releases), i never bothered testing groffer(1), it's simply not worth wasting time on.  Nobody should ever use it for anything, and i still think that groffer(1) ought to be completely deleted from the groff tree.  Use the real things, do not use poorly thought-out and poorly coded, likely insecure wrappers.

Oh well, i don't really care what people do with groffer(1).  I merely wanted to point out that manpath(1) cannot be used.

Of course, there is no good alternative.  The groffer(1) wrapper script is gratuitously trying to redo half of the work of the man(1) utility.  That's obviously a bad idea, but if somebody wants to do that, they have to rely on internals of the man(1) command, even though those differ from system to system, and what works with one man system may not work with another.

Ingo Schwarze <schwarze>
Project Member
Fri 26 Apr 2019 05:59:17 AM UTC, original submission:  

The MANPATH environment variable may be prefixed or suffixed by a bare colon (:) character or contains a double colon (::). These colon characters have the meaning to insert respectively before, after or between the man directory list determined from the content of the man configuration files.

See the description of the MANPATH variable in the manpath man page for the complete reference.

The groffer tool does not support these colon-specific values in MANPATH and ends in error when facing them:

   $ echo $MANPATH
   $ man -w ls
   $ groffer ls
   main_do_fileargs(): ls is neither a file nor a man page; at /usr/share/groff/1.22.3/groffer/main_subs.pl line 1548.
   groffer: empty input
   $ groffer -v
   groffer 2.2.5 is part of groff version 1.22.3.
   GNU groff and groffer come with ABSOLUTELY NO WARRANTY.
   You may redistribute copies of groff and its subprograms
   under the terms of the GNU General Public License.

Looking in /usr/share/groff/1.22.3/groffer/man.pl, the man_setup() function should be adapted maybe to only rely on the output of the manpath command as this command could return the manpath system configuration needed when MANPATH is prefixed/suffixed by a colon character or contains a double colon.



(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by schwarze (Posted a comment)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-05-08 barx Carbon-CopyRemoved 93119 => -
    2020-05-08 schwarze Severity2 - Minor => 1 - Wish
        Item GroupIncorrect behaviour => New feature
        StatusNone => Wont Fix
        Open/ClosedOpen => Closed
    2019-04-26 schwarze Severity3 - Normal => 2 - Minor

    Back to the top

    Powered by Savane 3.6