NetBSD Problem Report #46185

From www@NetBSD.org  Tue Mar 13 15:52:27 2012
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	by www.NetBSD.org (Postfix) with ESMTP id 9364763E0EE
	for <gnats-bugs@gnats.NetBSD.org>; Tue, 13 Mar 2012 15:52:27 +0000 (UTC)
Message-Id: <20120313155226.C83DB63B946@www.NetBSD.org>
Date: Tue, 13 Mar 2012 15:52:26 +0000 (UTC)
From: abs@absd.org
Reply-To: abs@absd.org
To: gnats-bugs@NetBSD.org
Subject: man pages fail in single user mode
X-Send-Pr-Version: www-1.0

>Number:         46185
>Category:       misc
>Synopsis:       man pages fail in single user mode
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    misc-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Mar 13 15:55:00 +0000 2012
>Last-Modified:  Wed Mar 14 06:30:02 +0000 2012
>Originator:     David Brownlee
>Release:        NetBSD 6 BETA
>Organization:
>Environment:
NetBSD forsaken 6.0_BETA NetBSD 6.0_BETA (GENERIC) amd64

from NetBSD-daily (2012-03-09)
>Description:
NetBSD no longer ships with pregenerated catman pages - man generates them on demand.

When it does this it writes them to /tmp, then displays to the user.

Unfortunately in single user /tmp is non writable, so this fails.
>How-To-Repeat:
- boot single user
- run 'man fsck'
>Fix:
Workarounds:
- mount / R/W. Sometimes issues the manpage is needed specifically to address an issue with just this operation.
- mount tmpfs on /tmp
- mandoc /usr/share/man/... | less

A possible fix might be for man to default to piping its output direct to the display/$PAGER

This may prove annoying for people who currently expect there to be an actually temporary file which can be edited, but is less of an issue than no manpage access in single user mode.

>Audit-Trail:
From: Manuel Bouyer <bouyer@antioche.eu.org>
To: gnats-bugs@NetBSD.org
Cc: misc-bug-people@NetBSD.org, gnats-admin@NetBSD.org, netbsd-bugs@NetBSD.org
Subject: Re: misc/46185: man pages fail in single user mode
Date: Tue, 13 Mar 2012 16:57:12 +0100

 On Tue, Mar 13, 2012 at 03:55:00PM +0000, abs@absd.org wrote:
 > NetBSD forsaken 6.0_BETA NetBSD 6.0_BETA (GENERIC) amd64
 > 
 > from NetBSD-daily (2012-03-09)
 > >Description:
 > NetBSD no longer ships with pregenerated catman pages - man generates them on demand.
 > 
 > When it does this it writes them to /tmp, then displays to the user.
 > 
 > Unfortunately in single user /tmp is non writable, so this fails.
 > >How-To-Repeat:
 > - boot single user
 > - run 'man fsck'
 > >Fix:
 > Workarounds:
 > - mount / R/W. Sometimes issues the manpage is needed specifically to address an issue with just this operation.
 > - mount tmpfs on /tmp
 > - mandoc /usr/share/man/... | less
 > 
 > A possible fix might be for man to default to piping its output direct to the display/$PAGER
 > 
 > This may prove annoying for people who currently expect there to be an actually temporary file which can be edited, but is less of an issue than no manpage access in single user mode.

 I guess man could try to create the file, and fall back to pipe if
 creating the file fails.

 -- 
 Manuel Bouyer <bouyer@antioche.eu.org>
      NetBSD: 26 ans d'experience feront toujours la difference
 --

From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: misc/46185: man pages fail in single user mode
Date: Tue, 13 Mar 2012 17:04:49 +0100

 On Tue, Mar 13, 2012 at 03:55:00PM +0000, abs@absd.org wrote:

 > This may prove annoying for people who currently expect there to be
 > an actually temporary file which can be edited, but is less of an issue
 > than no manpage access in single user mode.

 Why would one want to do that? Isn't that a rare exception, in which case
 you could also just do "man $1 > /tmp/myfile; vi /tmp/myfile" instead?

 The other difference is that the pager will not display the position in
 the man page correctly:

    --More--(9%)

 becomes:

    --More--(byte 1086)

 Not a big deal, IMHO.

 If we make this optional, I'd argue for pipe-mode as default.

 Martin

From: Matthew Mondor <mm_lists@pulsar-zone.net>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: misc/46185: man pages fail in single user mode
Date: Tue, 13 Mar 2012 19:07:33 -0400

 On Tue, 13 Mar 2012 16:05:04 +0000 (UTC)
 Martin Husemann <martin@duskware.de> wrote:

 >  If we make this optional, I'd argue for pipe-mode as default.

 I agree,
 -- 
 Matt

From: matthew green <mrg@eterna.com.au>
To: gnats-bugs@NetBSD.org
Cc: misc-bug-people@netbsd.org, gnats-admin@netbsd.org,
    netbsd-bugs@netbsd.org, abs@absd.org
Subject: re: misc/46185: man pages fail in single user mode
Date: Wed, 14 Mar 2012 10:45:34 +1100

 i wouldn't say that invoking an editor on any piece of text is
 a "rare" operation.  i regularly do that (in a read-only mode)
 on lots of files i'm not actually editing, but want an editor
 to view / traverse it with.

 that said, IMO people who want to vi cat pages should just
 build and install them all like the old build :-)


 .mrg.

From: David Holland <dholland-bugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: misc/46185: man pages fail in single user mode
Date: Wed, 14 Mar 2012 06:28:35 +0000

 On Tue, Mar 13, 2012 at 04:05:04PM +0000, Martin Husemann wrote:
  >  The other difference is that the pager will not display the position in
  >  the man page correctly:
  >  
  >     --More--(9%)
  >  
  >  becomes:
  >  
  >     --More--(byte 1086)
  >  
  >  Not a big deal, IMHO.

 No, but that's the kind of small thing that some people (possibly
 including me) are bound to find intensely irritating.

 Probably the best place to fix this particular problem is in less
 though.

  >  If we make this optional, I'd argue for pipe-mode as default.

 I'm not so sure...

 -- 
 David A. Holland
 dholland@netbsd.org

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.