NetBSD Problem Report #46537
From www@NetBSD.org Sun Jun 3 23:25:28 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 A31DD63BEE1
for <gnats-bugs@gnats.NetBSD.org>; Sun, 3 Jun 2012 23:25:28 +0000 (UTC)
Message-Id: <20120603232527.E2AA563BA27@www.NetBSD.org>
Date: Sun, 3 Jun 2012 23:25:27 +0000 (UTC)
From: hans@netbsd.org
Reply-To: hans@netbsd.org
To: gnats-bugs@NetBSD.org
Subject: MAKEDEV runs MAKEDEV.local using sh instead of HOST_SH when run as part of a cross-build
X-Send-Pr-Version: www-1.0
>Number: 46537
>Category: toolchain
>Synopsis: MAKEDEV runs MAKEDEV.local using sh instead of HOST_SH when run as part of a cross-build
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: tsutsui
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Jun 03 23:30:00 +0000 2012
>Closed-Date: Thu Jun 28 08:05:50 +0000 2012
>Last-Modified: Thu Jun 28 08:05:50 +0000 2012
>Originator: Hans Rosenfeld
>Release: 6.0_BETA2
>Organization:
>Environment:
SunOS bl0rg 5.11 oi_151a4 i86pc i386 i86pc
>Description:
When cross-building install-image or live-image, MAKEDEV from the etc set is run using HOST_SH. MAKEDEV itself runs MAKEDEV.local using sh, which isn't necessesarily good enough:
/usr/pkg/bin/pdksh work/dev/MAKEDEV -s all | /export/ws/netbsd/6/src/../tooldir.SunOS-5.11-i86pc/bin/nbsed -e '/^\. type=dir/d' -e 's,^\.,./dev,' >> work.spec
work/dev/MAKEDEV.local[402]: local: not found [No such file or directory]
work/dev/MAKEDEV.local[449]: eval[1]: all: not found [No such file or directory]
work/dev/MAKEDEV.local[402]: local: not found [No such file or directory]
work/dev/MAKEDEV.local[449]: eval[1]: all: not found [No such file or directory]
>How-To-Repeat:
Try to build an install-image or live-image on SunOS.
>Fix:
- use HOST_SH in MAKEDEV when running MAKEDEV.local
- don't run MAKEDEV.local at all, as it is expected to be empty
- don't run MAKEDEV at all, as the system is expected to create a tmpfs /dev and run MAKEDEV at boot
>Release-Note:
>Audit-Trail:
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
To: gnats-bugs@NetBSD.org
Cc: hans@NetBSD.org, netbsd-bugs@NetBSD.org, tsutsui@ceres.dti.ne.jp
Subject: Re: toolchain/46537: MAKEDEV runs MAKEDEV.local using sh instead of
HOST_SH when run as part of a cross-build
Date: Mon, 4 Jun 2012 23:41:44 +0900
> >Synopsis: MAKEDEV runs MAKEDEV.local using sh instead of HOST_SH when run as part of a cross-build
> - use HOST_SH in MAKEDEV when running MAKEDEV.local
How about this patch? (at least no breakage on NetBSD/i386 6.0_BETA host)
Index: etc/MAKEDEV.tmpl
===================================================================
RCS file: /cvsroot/src/etc/MAKEDEV.tmpl,v
retrieving revision 1.154
diff -u -p -r1.154 MAKEDEV.tmpl
--- etc/MAKEDEV.tmpl 7 Apr 2012 17:22:10 -0000 1.154
+++ etc/MAKEDEV.tmpl 4 Jun 2012 14:22:22 -0000
@@ -421,6 +421,7 @@ setup()
{
PATH=/sbin:/usr/sbin:/bin:/usr/bin:/rescue
+ : ${HOST_SH:=sh}
: ${TOOL_MKNOD:=mknod}
: ${TOOL_MTREE:=mtree}
: ${TOOL_PAX:=pax}
@@ -2091,9 +2092,9 @@ local)
umask 0
if [ -n "$count_nodes" ]; then
count_nodes=$((count_nodes + \
- $(linecount "$(sh "$0.local" $opts -s all)") ))
+ $(linecount "$("$HOST_SH" "$0.local" $opts -s all)") ))
else
- sh "$0.local" $opts all
+ "$HOST_SH" "$0.local" $opts all
fi
umask 077
fi
---
Izumi Tsutsui
From: Alan Barrett <apb@netbsd.org>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: toolchain/46537: MAKEDEV runs MAKEDEV.local using sh instead of
HOST_SH when run as part of a cross-build
Date: Mon, 4 Jun 2012 18:20:05 +0200
On Mon, 04 Jun 2012, Izumi Tsutsui wrote:
> > - use HOST_SH in MAKEDEV when running MAKEDEV.local
>
> How about this patch? (at least no breakage on NetBSD/i386 6.0_BETA host)
Looks good; thanks.
--apb (Alan Barrett)
From: "Izumi Tsutsui" <tsutsui@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/46537 CVS commit: src/etc
Date: Tue, 5 Jun 2012 13:20:01 +0000
Module Name: src
Committed By: tsutsui
Date: Tue Jun 5 13:20:01 UTC 2012
Modified Files:
src/etc: MAKEDEV.tmpl
Log Message:
Invoke MAKEDEV.local via $HOST_SH (default ${HOST_SH:=sh}) instead of
hardcoded "sh" to avoid unexpected errors on cross build hosts in
src/distrib/common/Makefile.makedev etc.
Should fix PR toolchain/46537, ok apb@
To generate a diff of this commit:
cvs rdiff -u -r1.155 -r1.156 src/etc/MAKEDEV.tmpl
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Responsible-Changed-From-To: toolchain-manager->tsutsui
Responsible-Changed-By: tsutsui@NetBSD.org
Responsible-Changed-When: Tue, 05 Jun 2012 22:23:26 +0900
Responsible-Changed-Why:
as committer
State-Changed-From-To: open->feedback
State-Changed-By: tsutsui@NetBSD.org
State-Changed-When: Tue, 05 Jun 2012 22:23:26 +0900
State-Changed-Why:
Can you confirm?
From: Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: toolchain/46537 (MAKEDEV runs MAKEDEV.local using sh instead of HOST_SH when run as part of a cross-build)
Date: Tue, 19 Jun 2012 18:42:32 +0200
On Tue, Jun 05, 2012 at 01:23:27PM +0000, tsutsui@NetBSD.org wrote:
> Can you confirm?
Seems to work as intended. Can you request a pullup into -6?
Hans
--
%SYSTEM-F-ANARCHISM, The operating system has been overthrown
State-Changed-From-To: feedback->pending-pullups
State-Changed-By: tsutsui@NetBSD.org
State-Changed-When: Wed, 20 Jun 2012 02:58:31 +0900
State-Changed-Why:
Confirmed and in [pullup-6 #358].
From: "Jeff Rizzo" <riz@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/46537 CVS commit: [netbsd-6] src/etc
Date: Thu, 28 Jun 2012 04:48:25 +0000
Module Name: src
Committed By: riz
Date: Thu Jun 28 04:48:25 UTC 2012
Modified Files:
src/etc [netbsd-6]: MAKEDEV.tmpl
Log Message:
Pull up following revision(s) (requested by tsutsui in ticket #358):
etc/MAKEDEV.tmpl: revision 1.156
Invoke MAKEDEV.local via $HOST_SH (default ${HOST_SH:=sh}) instead of
hardcoded "sh" to avoid unexpected errors on cross build hosts in
src/distrib/common/Makefile.makedev etc.
Should fix PR toolchain/46537, ok apb@
To generate a diff of this commit:
cvs rdiff -u -r1.151.2.2 -r1.151.2.3 src/etc/MAKEDEV.tmpl
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: dholland@NetBSD.org
State-Changed-When: Thu, 28 Jun 2012 08:05:50 +0000
State-Changed-Why:
pulled up, thanks
>Unformatted:
(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.