From nobody@FreeBSD.org  Sat Jul 16 15:51:29 2011
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B5943106575D
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 16 Jul 2011 15:51:29 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id A59308FC0A
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 16 Jul 2011 15:51:29 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p6GFpTrY083686
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 16 Jul 2011 15:51:29 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id p6GFpTNU083685;
	Sat, 16 Jul 2011 15:51:29 GMT
	(envelope-from nobody)
Message-Id: <201107161551.p6GFpTNU083685@red.freebsd.org>
Date: Sat, 16 Jul 2011 15:51:29 GMT
From: Momchil Ivanov <momchil@xaxo.eu>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Update man(1)
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         158973
>Category:       docs
>Synopsis:       Update man(1)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    issyl0
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jul 16 16:00:22 UTC 2011
>Closed-Date:    Mon Jun 11 19:41:11 UTC 2012
>Last-Modified:  Mon Jun 11 19:41:11 UTC 2012
>Originator:     Momchil Ivanov
>Release:        FreeBSD 8.2-STABLE #13: Sat Feb 26 16:30:35 CET 2011
>Organization:
>Environment:
FreeBSD 8.2-STABLE #13: Sat Feb 26 16:30:35 CET 2011 i386
>Description:
man(1) does not state, that it can display man pages outside of the manpath directory structure. From time to time one needs to display a man page from some third party sources that one has downloaded but not installed yet: man <somefile>, but the caveat is that <somefile> needs to include at least one "/", otherwise man fails. See /usr/src/gnu/usr.bin/man/man/man.c:208 for more details:

      else if (strchr (nextarg, '/') != NULL && is_file (nextarg) == 1)
	{
	  format_and_display (NULL, ultimate_source(nextarg, dirname(nextarg)),
			      NULL);
	}
      else
	{
	  status = man (nextarg);

	  if (status == 0)
	    gripe_not_found (nextarg, longsec);
	}
>How-To-Repeat:
man <somefile>

<somefile> has no "/", i.e. is in the current directory
>Fix:
Update man(1) accordingly, so that it reflects the requirement for at least one "/" in the file name/path, whenever one wants to display a man page outside the manpath tree structure

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-doc->gordon 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Mon Jul 18 02:21:11 UTC 2011 
Responsible-Changed-Why:  
gordon, was this one of the changes that you made, by any chance? 

http://www.freebsd.org/cgi/query-pr.cgi?pr=158973 
Responsible-Changed-From-To: gordon->issyl0 
Responsible-Changed-By: issyl0 
Responsible-Changed-When: Sun Jun 10 18:24:53 UTC 2012 
Responsible-Changed-Why:  
Give myself this PR.  I have patches that I plan to merge with stable/8 
and stable/7 soon to fix this issue. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=158973 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: docs/158973: commit references a PR
Date: Mon, 11 Jun 2012 19:05:25 +0000 (UTC)

 Author: issyl0 (doc committer)
 Date: Mon Jun 11 19:05:10 2012
 New Revision: 236907
 URL: http://svn.freebsd.org/changeset/base/236907
 
 Log:
   Partial merge of r213507 from head:
   
   In r178993, the ability to view a man page by giving a path to the
   man page itself was added, but never documented.  Subsequently, the
   GNU-licensed man(1) and its man page were replaced by BSD licensed
   implementations, and later on this undocumented functionality was
   also added to the new BSD-licensed man(1), together with
   documentation.
   
   This is a merge of the documentation part of that commit (r213507)
   into the GNU-licensed man(1) man page in stable/7, in order to
   document the available functionality.
   
   PR:		docs/158973
   Merge help:	bz
   Approved by:	gabor (mentor)
 
 Modified:
   stable/7/gnu/usr.bin/man/man/man.man
 Directory Properties:
   stable/7/gnu/usr.bin/man/   (props changed)
 
 Modified: stable/7/gnu/usr.bin/man/man/man.man
 ==============================================================================
 --- stable/7/gnu/usr.bin/man/man/man.man	Mon Jun 11 18:47:26 2012	(r236906)
 +++ stable/7/gnu/usr.bin/man/man/man.man	Mon Jun 11 19:05:10 2012	(r236907)
 @@ -14,7 +14,7 @@
  .\"
  .\" $FreeBSD$
  .\"
 -.Dd December 3, 2005
 +.Dd October 7, 2010
  .Dt MAN 1
  .Os
  .Sh NAME
 @@ -233,6 +233,13 @@ printed.
  Do not actually display the man pages, but do print the location(s) of
  the files that would be formatted or displayed.
  .El
 +.Ss Displaying Specific Manual Files
 +The
 +.Nm
 +utility also supports displaying a specific manual page if passed a path
 +to the file as long as it contains a
 +.Sq /
 +character.
  .Sh ENVIRONMENT
  .Bl -tag -width ".Ev MACHINE_ARCH"
  .It Ev LC_ALL , LC_CTYPE , LANG
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: docs/158973: commit references a PR
Date: Mon, 11 Jun 2012 19:10:19 +0000 (UTC)

 Author: issyl0 (doc committer)
 Date: Mon Jun 11 19:09:55 2012
 New Revision: 236908
 URL: http://svn.freebsd.org/changeset/base/236908
 
 Log:
   Partial merge of r213507 from head:
   
   In r178993, the ability to view a man page by giving a path to the
   man page itself was added, but never documented.  Subsequently, the
   GNU-licensed man(1) and its man page were replaced by BSD licensed
   implementations, and later on this undocumented functionality was
   also added to the new BSD-licensed man(1), together with
   documentation.
   
   This is a merge of the documentation part of that commit (r213507)
   into the GNU-licensed man(1) man page in stable/8, in order to
   document the available functionality.
   
   PR:		docs/158973
   Merge help:	bz
   Approved by:	gabor (mentor)
 
 Modified:
   stable/8/gnu/usr.bin/man/man/man.man
 Directory Properties:
   stable/8/gnu/usr.bin/man/   (props changed)
 
 Modified: stable/8/gnu/usr.bin/man/man/man.man
 ==============================================================================
 --- stable/8/gnu/usr.bin/man/man/man.man	Mon Jun 11 19:05:10 2012	(r236907)
 +++ stable/8/gnu/usr.bin/man/man/man.man	Mon Jun 11 19:09:55 2012	(r236908)
 @@ -14,7 +14,7 @@
  .\"
  .\" $FreeBSD$
  .\"
 -.Dd December 3, 2005
 +.Dd October 7, 2010
  .Dt MAN 1
  .Os
  .Sh NAME
 @@ -233,6 +233,13 @@ printed.
  Do not actually display the man pages, but do print the location(s) of
  the files that would be formatted or displayed.
  .El
 +.Ss Displaying Specific Manual Files
 +The
 +.Nm
 +utility also supports displaying a specific manual page if passed a path
 +to the file as long as it contains a
 +.Sq /
 +character.
  .Sh ENVIRONMENT
  .Bl -tag -width ".Ev MACHINE_ARCH"
  .It Ev LC_ALL , LC_CTYPE , LANG
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: open->closed 
State-Changed-By: issyl0 
State-Changed-When: Mon Jun 11 19:41:09 UTC 2012 
State-Changed-Why:  
The changes have been merged with older versions of FreeBSD, so I'm now 
closing this PR.  Thanks again! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=158973 
>Unformatted:
