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

 
 

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

Submitter:  None
Submitted:  Fri 26 Apr 2019 05:59:17 AM UTC
   
 
Category:  None Severity:  1 - Wish
Item Group:  Feature change Status:  Rejected
Privacy:  Public Assigned to:  schwarze
Open/Closed:  Closed Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

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>
Group 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>
Group 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
   /usr/share/man/mpich-x86_64:
   $ man -w ls
   /usr/share/man/man1/ls.1.gz
   $ 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.

Anonymous

 

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

Attach Files:
   
   
Comment:
   

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 gbranden (Updated the item)
  • -email is unavailable- added by schwarze (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-06-15 gbranden Assigned toNone schwarze
    2020-05-08 barx Carbon-CopyRemoved 93119 -
    2020-05-08 schwarze Severity2 - Minor 1 - Wish
        Item GroupIncorrect behaviour Feature change
        StatusNone Rejected
        Open/ClosedOpen Closed
    2019-04-26 schwarze Severity3 - Normal 2 - Minor

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code