Opened 16 years ago

Closed 8 years ago

#19343 closed defect (wontfix)

openssl: man page names conflict with system man page names

Reported by: aetherknight@… Owned by: larryv (Lawrence Velázquez)
Priority: Normal Milestone:
Component: ports Version: 1.7.1
Keywords: openssl man Cc: neverpanic (Clemens Lang), raimue (Rainer Müller)
Port: openssl

Description

The openssl package installs several man pages in man section 1 whose names overlap with various standard Mac OS X commands, such as passwd. This causes commands such as man passwd to display the man page for openssl passwd instead of the passwd user account password changing utility, if man has been configured to search in /opt/local/share/man before searching in the normal man locations.

Some Linux distributions deal with this by renaming the openssl man section 1 pages to ssl-name or openssl-name, such as Gentoo. (look in the src_install() method).

Could MacPorts' openssl port do something similar?

Attachments (1)

patch-openssl-mansuffix.diff (480 bytes) - added by raimue (Rainer Müller) 15 years ago.

Download all attachments as: .zip

Change History (11)

comment:1 Changed 16 years ago by mf2k (Frank Schima)

Owner: changed from macports-tickets@… to mww@…

comment:2 Changed 16 years ago by raimue (Rainer Müller)

Cc: raimue@… added

As Apple applies a suffix to the man pages, it would make perfect sense to do the same. In /usr/share/man/man1 exists both passwd.1.gz and passwd.1ssl.gz, so you can choose between the man pages using man 1 passwd and man 1ssl passwd.

I took a quick look at the OpenSSL Makefile and I assume it would be as easy as passing MANSUFFIX=ssl in build.args.

comment:3 Changed 16 years ago by (none)

Milestone: Port Bugs

Milestone Port Bugs deleted

Changed 15 years ago by raimue (Rainer Müller)

comment:4 Changed 14 years ago by raimue (Rainer Müller)

Patch committed in r73018.

But there is still no way to access system's passwd(1) man page without using the full path.

comment:5 in reply to:  4 Changed 10 years ago by jerryyhom

Replying to raimue@…:

But there is still no way to access system's passwd(1) man page without using the full path.

Just a thought, how about adding symlinks to the shadowed pages? Perhaps a script could test for all possible shadow pages, unless it is only passwd.

comment:6 Changed 10 years ago by jerryyhom

If anyone still cares about this issue, the following might be just stating the obvious. After a bit of digging, openssl installs man pages in man{1,3,5,7} and shadows several pages. Considering that MANPATH is a convenience to access collections of man pages, adding symlinks would break the boundaries of a collection and probably is not the right thing to do. Renaming man pages might be confusing except to gentoo users. Using -M reinforces the idea that the user (must) knows which collection to look in.

comment:7 Changed 10 years ago by jmroot (Joshua Root)

Cc: cal@… added
Owner: changed from mww@… to larryv@…

comment:8 Changed 8 years ago by larryv (Lawrence Velázquez)

Cc: larryv@… added

Cc Me!

comment:9 Changed 8 years ago by larryv (Lawrence Velázquez)

Cc: larryv@… removed

Cc Me!

comment:10 Changed 8 years ago by neverpanic (Clemens Lang)

Resolution: wontfix
Status: newclosed

I think there is no good solution here. The problem is with how manpages are looked up; the algorithm is currently:

foreach manpath in $MANPATH:
  foreach mansection in $MANSECTION:
    test for $manpath/$manpage.$mansection

but should probably be

foreach mansection in $MANSECTION:
  foreach manpath in $MANPATH:
    test for $manpage/$manpage.$mansection

At the very least, searching for a specific match should be done in all of $MANPATH when man is invoked with an explicit section, rather than accepting passwd.1ssl as a result for man 1 passwd at the first entry of $MANPATH.

We might be able to work around this by prefixing the manpage sections of OpenSSL manpages, rather than suffixing, so that OpenSSL's copy of the manpage was named passwd.ssl1, but this is probably counter-intuitive for users.

We should report this to the developers of man and ask them to change the lookup algorithm. I don't think we can fix this properly in OpenSSL.

Note: See TracTickets for help on using tickets.