Bug 1077297 - man2html rejects inter-manpage URLs for man sections such as "3pm", "3ssl", "3stap"
Summary: man2html rejects inter-manpage URLs for man sections such as "3pm", "3ssl", "...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: man2html
Version: 19
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: T.C. Hollingsworth
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 526112
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-03-17 16:27 UTC by Frank Ch. Eigler
Modified: 2014-04-02 09:31 UTC (History)
3 users (show)

Fixed In Version: man2html-1.6-13.g.fc20
Clone Of: 526112
Environment:
Last Closed: 2014-04-02 09:05:17 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Frank Ch. Eigler 2014-03-17 16:27:12 UTC
This old bug is back, as per:

Name        : man2html-core
Version     : 1.6
Release     : 11.g.fc19


+++ This bug was initially created as a clone of Bug #526112 +++

man2html.c:add_links() appears to accept only a few limited
forms of inter-manpage references such as

.IR stapprobes.iosched (3stap),

and renders them as ordinary <I> text rather than <A HREF=....>.
The code responsible for this appears to accept only "[1-9]X[a-z]*",
i.e., effectively hard-coded for Xlib pages.

This hacky little patch generalizes it:

--- man2html.c~ 2007-08-05 15:15:23.000000000 -0400
+++ man2html.c  2009-09-28 15:46:30.000000000 -0400
@@ -170,8 +170,11 @@
                  && (isalnum(f[-1]) || f[-1]=='>')
                                 /* section is n or l or starts with a digit */
                  && strchr("123456789nl", f[1])
-                 && (g-f == 2 || (g-f == 3 && isdigit(f[1]) && isalpha(f[2]))
-                              || (f[2] == 'X' && isdigit(f[1])))
+                 && (g-f == 2
+                      || (g-f == 3 && isdigit(f[1]) && isalpha(f[2]))
+                      || (g-f == 4 && isdigit(f[1]) && isalpha(f[2]) && isalpha(f[3]))
+                      || (g-f == 5 && isdigit(f[1]) && isalpha(f[2]) && isalpha(f[3]) && isalpha(f[4]))
+                      || (g-f == 6 && isdigit(f[1]) && isalpha(f[2]) && isalpha(f[3]) && isalpha(f[4]) && isalpha(f[5])))
               ) {
                /* this might be a link */
                h=f-1;

--- Additional comment from Ivana Varekova on 2009-09-29 04:05:40 EDT ---

Hello, 
you are right but I'm not sure whether it is ok to have a man page in this sections (e.g. package man will not go through them they are not set in /etc/man.config configuration file). Is there any special reason to have it there?

--- Additional comment from Frank Ch. Eigler on 2009-09-29 12:37:44 EDT ---

The 3ssl etc. man pages are installed under man3, so man itself does
show them.

--- Additional comment from Ivana Varekova on 2009-09-30 02:01:39 EDT ---

Then the suffix should be only 3 not 3ssl, if there is a conflict then it should be solved another way, not to change suffixes.

--- Additional comment from Frank Ch. Eigler on 2009-09-30 10:35:24 EDT ---

Actually it is quite valid in manpage land to have textual
subsection names after the section numbers.  Many other unixes
do this too.  It's just that man2html appears to have been
accidentally hardcoded for "X..." subsection names.

--- Additional comment from Ivana Varekova on 2009-10-12 04:36:31 EDT ---

Thanks, fixed in man-1_6f-23_fc13 and man-1_6f-23_fc12.

Comment 1 T.C. Hollingsworth 2014-03-18 05:09:27 UTC
Sorry, it looked like we had inherited a patch from Debian that fixed this but now I see it only fixed the "3p" case for Perl.  I've replaced that patch with Ivana's (which looks awfully similar to yours ;-).

A fixed version is building now for rawhide/F20/F19/EPEL7.  Thanks for the report!

Comment 2 Fedora Update System 2014-03-18 05:11:40 UTC
man2html-1.6-13.g.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/man2html-1.6-13.g.fc20

Comment 3 Fedora Update System 2014-03-18 05:12:45 UTC
man2html-1.6-13.g.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/man2html-1.6-13.g.fc19

Comment 4 Fedora Update System 2014-03-19 08:40:47 UTC
Package man2html-1.6-13.g.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing man2html-1.6-13.g.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-4036/man2html-1.6-13.g.fc19
then log in and leave karma (feedback).

Comment 5 Fedora Update System 2014-04-02 09:05:17 UTC
man2html-1.6-13.g.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 6 Fedora Update System 2014-04-02 09:31:12 UTC
man2html-1.6-13.g.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.