NetBSD Problem Report #40316

From www@NetBSD.org  Thu Jan  1 21:32:01 2009
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by narn.NetBSD.org (Postfix) with ESMTP id B5E1363B8C6
	for <gnats-bugs@gnats.netbsd.org>; Thu,  1 Jan 2009 21:32:01 +0000 (UTC)
Message-Id: <20090101213201.749EF63B884@narn.NetBSD.org>
Date: Thu,  1 Jan 2009 21:32:01 +0000 (UTC)
From: dross@pobox.com
Reply-To: dross@pobox.com
To: gnats-bugs@NetBSD.org
Subject: "df: not found" printed while MAKEDEV all runs on NetBSD Atari install
X-Send-Pr-Version: www-1.0

>Number:         40316
>Category:       port-atari
>Synopsis:       "df: not found" printed while MAKEDEV all runs on NetBSD Atari install
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    port-atari-maintainer
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jan 01 21:35:00 +0000 2009
>Closed-Date:    Sat Jan 17 00:11:10 +0000 2009
>Last-Modified:  Sat Jan 17 00:11:10 +0000 2009
>Originator:     David Ross
>Release:        4.0 (HEAD)
>Organization:
n/a
>Environment:
n/a
>Description:
When "/bin/sh MAKEDEV all" is running during install, I get "df: not found".  This happens twice and it does not stop the install.  Probably the df binary just needs to be dropped onto the sysinst floppy.
>How-To-Repeat:
1.  Install NetBSD onto an Atari TT030.
2.  During the install, watch what happens during "/bin/sh MAKEDEV all"
Observe the "df: not found" messages.
>Fix:
Put the df binary on the sysinst floppy (?)

>Release-Note:

>Audit-Trail:
From: Alan Barrett <apb@cequrux.com>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: port-atari/40316: "df: not found" printed while MAKEDEV all
	runs on NetBSD Atari install
Date: Fri, 2 Jan 2009 12:16:49 +0200

 On Thu, 01 Jan 2009, dross@pobox.com wrote:
 > When "/bin/sh MAKEDEV all" is running during install, I get "df: not
 > found".  This happens twice and it does not stop the install.
 > Probably the df binary just needs to be dropped onto the sysinst
 > floppy.

 As a quick workaround, change $(df fd) to $(nooutput -2 df fd) in line
 481 of src/etc/MAKEDEV.tmpl.  This will simply suppress the error
 message.  I am working on a way of detecting whether the desc file
 system is mounted, without using the df command.

 --apb (Alan Barrett)

From: Alan Barrett <apb@cequrux.com>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: port-atari/40316: "df: not found" printed while MAKEDEV all
	runs on NetBSD Atari install
Date: Fri, 2 Jan 2009 14:08:57 +0200

 On Fri, 02 Jan 2009, Alan Barrett wrote:
 >  As a quick workaround, change $(df fd) to $(nooutput -2 df fd) in line
 >  481 of src/etc/MAKEDEV.tmpl.  This will simply suppress the error
 >  message.  I am working on a way of detecting whether the desc file
 >  system is mounted, without using the df command.

 Please try the appended patch.

 Index: etc/MAKEDEV.tmpl
 --- etc/MAKEDEV.tmpl	28 Nov 2008 16:04:31 -0000	1.118
 +++ etc/MAKEDEV.tmpl	2 Jan 2009 12:05:10 -0000
 @@ -478,8 +478,22 @@

  	# Check if we have fdesc mounted
  	if [ -d fd ]; then
 -		case "$(df fd)" in
 -		*fdesc*)	nofdesc=false;;
 +		# Parse the output from "mount -u -o nosuchoption .".
 +		#
 +		# If the current directory is a mount point for the
 +		# fdesc file system, then the expected output (whether
 +		# or not the current user is root) is:
 +		#	mount_fdesc: -o suchoption: option not supported.
 +		#
 +		# If the current directory is not a mount point, then
 +		# we expect the output to be:
 +		#	mount: .: unknown special file or file system.
 +		#
 +		# If we are not running on NetBSD, or mount(8) is not
 +		# found, then we should get some other error message.
 +		#
 +		case "$({ LC_ALL=C mount -u -o nosuchoption . ; } 2>&1)" in
 +		*mount_fdesc*)	nofdesc=false;;
  		*)		nofdesc=true;;
  		esac
  	else

From: "David Ross" <dross@pobox.com>
To: <gnats-bugs@NetBSD.org>,
	<port-atari-maintainer@netbsd.org>,
	<gnats-admin@netbsd.org>,
	<netbsd-bugs@netbsd.org>
Cc: 
Subject: Re: port-atari/40316: "df: not found" printed while MAKEDEV all runs on NetBSD Atari install
Date: Fri, 2 Jan 2009 10:13:59 -0800

 Mmm, unfortunately I don't even have a working NetBSD system up and running 
 to patch the sysinst disk with.  (sad but true)  Would it be possible for 
 you to alter the existing sysinst image (from HEAD) with this change and 
 then I can try that out.

 Or if you're reasonably confident this will work, just submit the change and 
 if it turns out to be problematic I'll file a different PR later.  =)

 Thanks for the fix!

 David Ross
 dross@pobox.com


 ----- Original Message ----- 
 From: "Alan Barrett" <apb@cequrux.com>
 To: <port-atari-maintainer@netbsd.org>; <gnats-admin@netbsd.org>; 
 <netbsd-bugs@netbsd.org>; <dross@pobox.com>
 Sent: Friday, January 02, 2009 4:25 AM
 Subject: Re: port-atari/40316: "df: not found" printed while MAKEDEV all 
 runs on NetBSD Atari install


 > The following reply was made to PR port-atari/40316; it has been noted by 
 > GNATS.
 >
 > From: Alan Barrett <apb@cequrux.com>
 > To: gnats-bugs@NetBSD.org
 > Cc:
 > Subject: Re: port-atari/40316: "df: not found" printed while MAKEDEV all
 > runs on NetBSD Atari install
 > Date: Fri, 2 Jan 2009 14:08:57 +0200
 >
 > On Fri, 02 Jan 2009, Alan Barrett wrote:
 > >  As a quick workaround, change $(df fd) to $(nooutput -2 df fd) in line
 > >  481 of src/etc/MAKEDEV.tmpl.  This will simply suppress the error
 > >  message.  I am working on a way of detecting whether the desc file
 > >  system is mounted, without using the df command.
 >
 > Please try the appended patch.
 >
 > Index: etc/MAKEDEV.tmpl
 > --- etc/MAKEDEV.tmpl 28 Nov 2008 16:04:31 -0000 1.118
 > +++ etc/MAKEDEV.tmpl 2 Jan 2009 12:05:10 -0000
 > @@ -478,8 +478,22 @@
 >
 >  # Check if we have fdesc mounted
 >  if [ -d fd ]; then
 > - case "$(df fd)" in
 > - *fdesc*) nofdesc=false;;
 > + # Parse the output from "mount -u -o nosuchoption .".
 > + #
 > + # If the current directory is a mount point for the
 > + # fdesc file system, then the expected output (whether
 > + # or not the current user is root) is:
 > + # mount_fdesc: -o suchoption: option not supported.
 > + #
 > + # If the current directory is not a mount point, then
 > + # we expect the output to be:
 > + # mount: .: unknown special file or file system.
 > + #
 > + # If we are not running on NetBSD, or mount(8) is not
 > + # found, then we should get some other error message.
 > + #
 > + case "$({ LC_ALL=C mount -u -o nosuchoption . ; } 2>&1)" in
 > + *mount_fdesc*) nofdesc=false;;
 >  *) nofdesc=true;;
 >  esac
 >  else
 >
 > 

From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
To: apb@cequrux.com, gnats-bugs@NetBSD.org
Cc: port-atari-maintainer@NetBSD.org, gnats-admin@NetBSD.org,
        netbsd-bugs@NetBSD.org, dross@pobox.com, tsutsui@ceres.dti.ne.jp
Subject: Re: port-atari/40316: "df: not found" printed while MAKEDEV allruns
	 on NetBSD Atari install
Date: Sat, 3 Jan 2009 18:08:36 +0900

 Alan Barrett wrote:

 >  Please try the appended patch.
 >  
 >  Index: etc/MAKEDEV.tmpl
 >  --- etc/MAKEDEV.tmpl	28 Nov 2008 16:04:31 -0000	1.118
 >  +++ etc/MAKEDEV.tmpl	2 Jan 2009 12:05:10 -0000
 >  @@ -478,8 +478,22 @@
 >   
 >   	# Check if we have fdesc mounted
 >   	if [ -d fd ]; then
 >  -		case "$(df fd)" in
 >  -		*fdesc*)	nofdesc=false;;
 >  +		# Parse the output from "mount -u -o nosuchoption .".
 >  +		#
 >  +		# If the current directory is a mount point for the
 >  +		# fdesc file system, then the expected output (whether
 >  +		# or not the current user is root) is:
 >  +		#	mount_fdesc: -o suchoption: option not supported.
 >  +		#
 >  +		# If the current directory is not a mount point, then
 >  +		# we expect the output to be:
 >  +		#	mount: .: unknown special file or file system.
 >  +		#
 >  +		# If we are not running on NetBSD, or mount(8) is not
 >  +		# found, then we should get some other error message.
 >  +		#
 >  +		case "$({ LC_ALL=C mount -u -o nosuchoption . ; } 2>&1)" in
 >  +		*mount_fdesc*)	nofdesc=false;;
 >   		*)		nofdesc=true;;
 >   		esac
 >   	else

 Shouldn't it be "mount -u -o nosuchoption fd", rather than "." ?
 i.e. shouldn't a mount point for mount_fdesc be /dev/fd, not /dev?

 Isn't it simpler to check output of mount(8) with no option?
 ---
 # mount | grep "^fdesc on `pwd`/fd "
 fdesc on /dev/fd type fdesc (local)
 # umount /dev/fd
 # mount | grep "^fdesc on `pwd`/fd "
 #
 ---

 Anyway, sysinst.fs for atari seems to have some free space
 so adding df(1) into it might be safer for netbsd-5 branch
 because changes against MAKEDEV.tmpl affects all ports
 and crossbuild environments.
 ---
 Izumi Tsutsui

From: Alan Barrett <apb@cequrux.com>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: port-atari/40316: "df: not found" printed while MAKEDEV
	allruns on NetBSD Atari install
Date: Sat, 3 Jan 2009 12:01:34 +0200

 On Sat, 03 Jan 2009, Izumi Tsutsui wrote:
 > >  +		case "$({ LC_ALL=C mount -u -o nosuchoption . ; } 2>&1)" in
 > >  +		*mount_fdesc*)	nofdesc=false;;
 > >   		*)		nofdesc=true;;
 > >   		esac
 > 
 > Shouldn't it be "mount -u -o nosuchoption fd", rather than "." ?
 > i.e. shouldn't a mount point for mount_fdesc be /dev/fd, not /dev?

 The mount_fdesc(8) man page doesn't have an example, but I thought that
 common usage was something like:

 	mount -t fdesc -o union fdesc /dev

 The fdesc file system supplies the following top-level directory entries:

 dr-xr-xr-x  2 root  wheel   512 Jan  1 23:17 fd
 lr-xr-xr-x  1 root  wheel     4 Jan  1 23:17 stderr -> fd/2
 lr-xr-xr-x  1 root  wheel     4 Jan  1 23:17 stdin -> fd/0
 lr-xr-xr-x  1 root  wheel     4 Jan  1 23:17 stdout -> fd/1
 crw-rw-rw-  1 root  wheel  1, 0 Jan  1 23:17 tty

 If you mounted it on /dev/fd, then you would get things like
 /dev/fd/fd/0 and /dev/fd/stdin instead of /dev/fd/0 and /dev/stdin.

 > Isn't it simpler to check output of mount(8) with no option?
 > ---
 > # mount | grep "^fdesc on `pwd`/fd "
 > fdesc on /dev/fd type fdesc (local)

 Then you have to worry about whether the output from pwd is identical to
 the corresponding output from mount (e.g. if a directory got renamed, or
 in the presence of chroots or symlinks), and whether any characters in
 the directory name need to be quoted to protect them from grep or the
 shell.

 > Anyway, sysinst.fs for atari seems to have some free space
 > so adding df(1) into it might be safer for netbsd-5 branch
 > because changes against MAKEDEV.tmpl affects all ports
 > and crossbuild environments.

 Then you have to check whether any other ports also need df to be added
 to their install file systems.

 If you are afraid of having MAKEDEV.tmpl revision 1.118 pulled up, then
 the simplest change for netbsd-5 (assuming that none of the ports mounts
 fdesc during installation) is simply to ignore the stderr output from df
 like this:

 --- MAKEDEV.tmpl        29 Nov 2008 20:44:51 -0000      1.113.2.5
 +++ MAKEDEV.tmpl        3 Jan 2009 09:53:09 -0000
 @@ -479,7 +479,7 @@

         # Check if we have fdesc mounted
         if [ -d fd ]; then
 -               case "$(df fd)" in
 +               case "$(nooutput -2 df fd)" in
                 *fdesc*)        nofdesc=false;;
                 *)              nofdesc=true;;
                 esac

 --apb (Alan Barrett)

From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
To: apb@cequrux.com, gnats-bugs@NetBSD.org
Cc: port-atari-maintainer@NetBSD.org, gnats-admin@NetBSD.org,
        netbsd-bugs@NetBSD.org, dross@pobox.com, tsutsui@ceres.dti.ne.jp
Subject: Re: port-atari/40316: "df: not found" printed while MAKEDEVallruns
	 on NetBSD Atari install
Date: Sat, 3 Jan 2009 19:21:06 +0900

 >  The mount_fdesc(8) man page doesn't have an example, but I thought that
 >  common usage was something like:
 >  
 >  	mount -t fdesc -o union fdesc /dev

 Ah, my bad. Sorry for noise.

 >  > Anyway, sysinst.fs for atari seems to have some free space
 >  > so adding df(1) into it might be safer for netbsd-5 branch
 >  > because changes against MAKEDEV.tmpl affects all ports
 >  > and crossbuild environments.
 >  
 >  Then you have to check whether any other ports also need df to be added
 >  to their install file systems.

 Well, it will be done by other guys who really want to suppress
 (harmless) error messages..

 I'll add df(1) to atari's sysinst.fs because it's still useful
 even on installation and atari still has good users who can test it :-)
 ---
 Izumi Tsutsui

From: Izumi Tsutsui <tsutsui@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/40316 CVS commit: src/distrib/atari/floppies
Date: Sat,  3 Jan 2009 18:11:26 +0000 (UTC)

 Module Name:	src
 Committed By:	tsutsui
 Date:		Sat Jan  3 18:11:26 UTC 2009

 Modified Files:
 	src/distrib/atari/floppies/install: list
 	src/distrib/atari/floppies/prepare: list

 Log Message:
 Add df(1) to installation md_root files for atari.

 It looks df(1) had been required by MAKEDEV(8) since NetBSD 1.6 days,
 and this could workaround PR port-atari/40316 in branches with
 minimum pullups.


 To generate a diff of this commit:
 cvs rdiff -r1.8 -r1.9 src/distrib/atari/floppies/install/list
 cvs rdiff -r1.5 -r1.6 src/distrib/atari/floppies/prepare/list

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->pending-pullups
State-Changed-By: tsutsui@NetBSD.org
State-Changed-When: Mon, 05 Jan 2009 00:38:56 +0900
State-Changed-Why:
Fix against MAKEDEV.tmpl has been committed, and df(1) is also added
to atari md_root. Pullup requests for the latter one have been sent.


From: Soren Jacobsen <snj@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/40316 CVS commit: [netbsd-5] src/distrib/atari/floppies
Date: Fri,  9 Jan 2009 02:07:20 +0000 (UTC)

 Module Name:	src
 Committed By:	snj
 Date:		Fri Jan  9 02:07:20 UTC 2009

 Modified Files:
 	src/distrib/atari/floppies/install [netbsd-5]: list
 	src/distrib/atari/floppies/prepare [netbsd-5]: list

 Log Message:
 Pull up following revision(s) (requested by tsutsui in ticket #233):
 	distrib/atari/floppies/install/list: revision 1.9
 	distrib/atari/floppies/prepare/list: revision 1.6
 Add df(1) to installation md_root files for atari.
 It looks df(1) had been required by MAKEDEV(8) since NetBSD 1.6 days,
 and this could workaround PR port-atari/40316 in branches with
 minimum pullups.


 To generate a diff of this commit:
 cvs rdiff -r1.7.20.1 -r1.7.20.2 src/distrib/atari/floppies/install/list
 cvs rdiff -r1.4.28.1 -r1.4.28.2 src/distrib/atari/floppies/prepare/list

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: Manuel Bouyer <bouyer@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/40316 CVS commit: [netbsd-4] src/distrib/atari/floppies
Date: Thu, 15 Jan 2009 23:02:23 +0000 (UTC)

 Module Name:	src
 Committed By:	bouyer
 Date:		Thu Jan 15 23:02:23 UTC 2009

 Modified Files:
 	src/distrib/atari/floppies/install [netbsd-4]: list
 	src/distrib/atari/floppies/prepare [netbsd-4]: list

 Log Message:
 Pull up following revision(s) (requested by tsutsui in ticket #1260):
 	distrib/atari/floppies/prepare/list: revision 1.6
 	distrib/atari/floppies/install/list: revision 1.9
 Add df(1) to installation md_root files for atari.
 It looks df(1) had been required by MAKEDEV(8) since NetBSD 1.6 days,
 and this could workaround PR port-atari/40316 in branches with
 minimum pullups.


 To generate a diff of this commit:
 cvs rdiff -r1.6.16.1 -r1.6.16.2 src/distrib/atari/floppies/install/list
 cvs rdiff -r1.4.4.1 -r1.4.4.2 src/distrib/atari/floppies/prepare/list

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: pending-pullups->closed
State-Changed-By: tsutsui@NetBSD.org
State-Changed-When: Sat, 17 Jan 2009 09:11:10 +0900
State-Changed-Why:
df(1) has been added on netbsd-4 and netbsd-5, and
MAKEDEV.tmpl fix has also been pulled up to netbsd-5.


>Unformatted:

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.