NetBSD Problem Report #54833
From tsutsui@ceres.dti.ne.jp Sun Jan 5 14:26:14 2020
Return-Path: <tsutsui@ceres.dti.ne.jp>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id D39897A170
for <gnats-bugs@gnats.NetBSD.org>; Sun, 5 Jan 2020 14:26:14 +0000 (UTC)
Message-Id: <202001051426.005EQ5bf009287@ceres.dti.ne.jp>
Date: Sun, 5 Jan 2020 23:26:05 +0900 (JST)
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
Reply-To: tsutsui@ceres.dti.ne.jp
To: gnats-bugs@NetBSD.org
Cc: tsutsui@ceres.dti.ne.jp
Subject: miniroot install fails to configure network
X-Send-Pr-Version: 3.95
>Number: 54833
>Category: install
>Synopsis: miniroot install fails to configure network
>Confidential: no
>Severity: serious
>Priority: low
>Responsible: tsutsui
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Jan 05 14:30:00 +0000 2020
>Closed-Date: Sat Feb 01 05:39:59 +0000 2020
>Last-Modified: Sat Dec 19 19:05:01 +0000 2020
>Originator: Izumi Tsutsui
>Release: NetBSD 9.0_RC1
>Organization:
>Environment:
System: NetBSD mirage 9.0_RC1 NetBSD 9.0_RC1 (GENERIC) #11: Thu Jan 2 14:19:17 JST 2020 tsutsui@mirage:/s/netbsd-9/src/sys/arch/i386/compile/GENERIC i386
Architecture: m68k
Machine: sun3, but affects all miniroot ports
>Description:
The miniroot install script for NetBSD/sun3 9.0_RC1 fails
to configure network:
---
You may configure the following network interfaces (the interfaces
marked with [X] have been successfully configured):
le0
Configure which interface? [done] le0
IP address? [] 192.168.20.65
Symbolic (host) name? hydra
Your network interface might require explicit selection
of the type of network medium attached. Supported media:
manual
Additional media type arguments (none)? []
Your network interface might require additional link-layer
directives (like 'link0'). If this is the case you can enter
these at the next prompt.
Additional link-layer arguments (none)? []
usage: ifconfig [-h] [-m] [-v] [-z] interface
[ af [ address [ dest_addr ] ] [ netmask mask ] [ prefixlen n ]
[ alias | -alias ] ]
[ up ] [ down ] [ metric n ] [ mtu n ]
[ vlan n vlanif i ] [ -vlanif i ]
[ [ af ] tunnel src_addr dest_addr ] [ deletetunnel ]
[ media type ] [ mediaopt opts ] [ -mediaopt opts ] [ instance minst ]
[ nwid network_id ] [ nwkey network_key | -nwkey ]
[ list scan ]
[ powersave | -powersave ] [ powersavesleep duration ]
[ hidessid | -hidessid ] [ apbridge | -apbridge ]
[ arp | -arp ]
[ preference n ]
[ link0 | -link0 ] [ link1 | -link1 ] [ link2 | -link2 ]
[ linkstr str | -linkstr ]
[ description str | descr str | -description | -descr ]
ifconfig -a [-b] [-d] [-h] [-m] [-u] [-v] [-z] [ af ]
ifconfig -l [-b] [-d] [-s] [-u]
ifconfig -C
ifconfig -w n
ifconfig interface create
ifconfig interface destroy
You may configure the following network interfaces (the interfaces
marked with [X] have been successfully configured):
le0
Configure which interface? [done]
---
>How-To-Repeat:
Install NetBSD/sun3 9.0_RC1 via miniroot.fs and configure network.
>Fix:
In src/distrib/miniroot/install.sub rev 1.47, netmask line was changed:
https://nxr.netbsd.org/diff/src/distrib/miniroot/install.sub?r1=/src/distrib/miniroot/install.sub@1.46&r2=/src/distrib/miniroot/install.sub@1.47&format=u&full=0
---
410
411 _interface_ip=$1
412 _interface_mask=$2
413
414 # Get IP address
415 resp="" # force one iteration
416 - while [ "X${resp}" = X"" ]; do
416 + while [ -z "${resp}" ]; do
417 echo -n "IP address? [$_interface_ip] "
418 getresp "$_interface_ip"
419 _interface_ip=$resp
420 done
421
422 # Get symbolic name
423 resp="" # force one iteration
424 - while [ "X${resp}" = X"" ]; do
424 + while [ -z "${resp}" ]; do
425 echo -n "Symbolic (host) name? "
426 getresp ""
427 _interface_symname=$resp
428 done
429
430 # Get netmask
431 resp="" # force one iteration
432 - while [ "X${resp}" = X"" ]; do
432 + while [ -n "${resp}" ]; do
433 echo -n "Netmask? [$_interface_mask] "
434 getresp "$_interface_mask"
435 _interface_mask=$resp
436 done
---
For line 432 it should be "-z" instead of "-n" as other lines?
---
Izumi Tsutsui
>Release-Note:
>Audit-Trail:
From: "Izumi Tsutsui" <tsutsui@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/54833 CVS commit: src/distrib/miniroot
Date: Sun, 12 Jan 2020 03:37:10 +0000
Module Name: src
Committed By: tsutsui
Date: Sun Jan 12 03:37:10 UTC 2020
Modified Files:
src/distrib/miniroot: install.sub
Log Message:
Fix miniroot installation failure on network configuration. PR/54833
No particular comment in the PR.
Should be pulled up to netbsd-9.
To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/distrib/miniroot/install.sub
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Responsible-Changed-From-To: install-manager->tsutsui
Responsible-Changed-By: tsutsui@NetBSD.org
Responsible-Changed-When: Sun, 12 Jan 2020 04:39:16 +0000
Responsible-Changed-Why:
State-Changed-From-To: open->needs-pullups
State-Changed-By: tsutsui@NetBSD.org
State-Changed-When: Sun, 12 Jan 2020 04:39:16 +0000
State-Changed-Why:
Found on 9.0_RC1.
State-Changed-From-To: needs-pullups->pending-pullups
State-Changed-By: tsutsui@NetBSD.org
State-Changed-When: Sat, 18 Jan 2020 05:12:12 +0000
State-Changed-Why:
[pullup-9 #622]
From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/54833 CVS commit: [netbsd-9] src/distrib/miniroot
Date: Tue, 21 Jan 2020 11:30:28 +0000
Module Name: src
Committed By: martin
Date: Tue Jan 21 11:30:28 UTC 2020
Modified Files:
src/distrib/miniroot [netbsd-9]: install.sub
Log Message:
Pull up following revision(s) (requested by tsutsui in ticket #622):
distrib/miniroot/install.sub: revision 1.50
distrib/miniroot/install.sub: revision 1.51
Fix miniroot installation failure on network configuration. PR/54833
No particular comment in the PR.
Should be pulled up to netbsd-9.
Fix "[: SMALL test, no fallback usage" error on miniroot installation.
Avoid and replace use of '-a', '(' and ')' operatos marked obsolescent
by modern POSIX.1-2017:
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/test.html#tag_20_128_16
as suggested by kre@ in PR/54835.
Should be pulled up to netbsd-9.
To generate a diff of this commit:
cvs rdiff -u -r1.48.2.1 -r1.48.2.2 src/distrib/miniroot/install.sub
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, 01 Feb 2020 05:39:59 +0000
State-Changed-Why:
Pullup complete.
From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/54833 CVS commit: [netbsd-8] src/distrib
Date: Sat, 19 Dec 2020 19:02:53 +0000
Module Name: src
Committed By: martin
Date: Sat Dec 19 19:02:53 UTC 2020
Modified Files:
src/distrib/amiga/miniroot [netbsd-8]: install.md
src/distrib/hp300/miniroot [netbsd-8]: install.md
src/distrib/mac68k/miniroot [netbsd-8]: install.md
src/distrib/miniroot [netbsd-8]: install.sh install.sub list upgrade.sh
src/distrib/mvme68k/miniroot [netbsd-8]: install.md
src/distrib/sun2/miniroot [netbsd-8]: install.md
src/distrib/sun3/miniroot [netbsd-8]: install.md
Log Message:
Pull up following revision(s) (requested by tsutsui in ticket #1639):
distrib/miniroot/install.sub: revision 1.54 (patch)
distrib/miniroot/install.sub: revision 1.56 (patch)
distrib/miniroot/install.sub: revision 1.57 (patch)
distrib/miniroot/install.sub: revision 1.58 (patch)
distrib/miniroot/install.sub: revision 1.59 (patch)
distrib/hp300/miniroot/install.md: revision 1.20
distrib/miniroot/list: revision 1.36
distrib/mvme68k/miniroot/install.md: revision 1.9
distrib/mvme68k/miniroot/install.md: revision 1.10
distrib/sun3/miniroot/install.md: revision 1.6
distrib/miniroot/install.sub: revision 1.47 (patch)
distrib/sun3/miniroot/install.md: revision 1.7
distrib/sun2/miniroot/install.md: revision 1.6
distrib/sun2/miniroot/install.md: revision 1.7
distrib/amiga/miniroot/install.md: revision 1.31
distrib/mac68k/miniroot/install.md: revision 1.6
distrib/mac68k/miniroot/install.md: revision 1.7
distrib/mac68k/miniroot/install.md: revision 1.8
distrib/miniroot/upgrade.sh: revision 1.23
distrib/miniroot/install.sh: revision 1.26
distrib/miniroot/upgrade.sh: revision 1.24
distrib/miniroot/install.sh: revision 1.27
distrib/hp300/miniroot/install.md: revision 1.18
distrib/hp300/miniroot/install.md: revision 1.19
distrib/miniroot/install.sub: revision 1.50 (patch)
distrib/miniroot/install.sub: revision 1.51 (patch)
distrib/miniroot/install.sub: revision 1.52 (patch)
distrib/miniroot/install.sub: revision 1.53 (patch)
Remove uses of test ... -a ... and test ... -o ...
eXorcize and `` -> $()
Fix miniroot installation failure on network configuration. PR/54833
No particular comment in the PR.
Should be pulled up to netbsd-9.
Fix "[: SMALL test, no fallback usage" error on miniroot installation.
Avoid and replace use of '-a', '(' and ')' operatos marked obsolescent
by modern POSIX.1-2017:
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/test.html#tag_20_128_16
as suggested by kre@ in PR/54835.
Should be pulled up to netbsd-9.
The idiom
set $whatever
while [ $# - gt 10 ]; do shift 10; done
eval echo \$$#
fails when $# turns out to be 10 (or any multiple), it would need
to be instead
while [ $# -ge 10 ]; do shift 9; done
but there hasn't been a shell that cannot handle ${10} (etc) correctly
in a very long time, so let's just use that instead (properly quoted,
in case IFS happens to contain a digit for some bizarre reason).
We should also "set -f" / "set +f" (or better, restore the prev setting of -f)
around the "set $whatever" part, but if that was ever going to cause a problem
here, it would have already, so leave that for now.
test ! -n "$foo" is just a quaint way of saying test -z "$foo"
and test ! -z "$foo" is really just test -n "$foo" so let's just
use the simple (and more obvious) forms.
NFCI.
The kernel and X sets should be specified in MD miniroot scripts.
Otherwise they are not listed at least on ftp installation.
The problem was reported by Martin Trusler on port-hp300@:
https://mail-index.netbsd.org/port-hp300/2020/11/21/msg000174.html
Should be pulled up to netbsd-9 and netbsd-8.
Add modules set for default sets on miniroot installation.
Should be pulled up to netbsd-9 and netbsd-8.
Add missing md_get_partition_range() that causes installation failure.
Also reported by Martin Trusler on testing hp300 miniroot.
Should be pulled up to netbsd-9 and netbsd-8.
Explicitly sort set names fetched via ftp nlist.
Several binary sets are stored as symbolic links on releases and
it seems some ftpd doesn't sort nlist outputs by name in such case.
Worth to pullup to netbsd-9 and netbsd-8.
Use proper release version strings ("9.1" rather than "91") in banners.
Also define and use "MACHINE" variable to describe port names
(no uname(1) or sysctl(8) in miniroot binary list by default).
I guess the short format like "91" by ${DISTRIBREV} was used only
for split sets for floppies in 1990's releases.
Worth to pullup to netbsd-9.
Inform the default installation directory in the official ftp server.
Fetch files via ftp using auto-fetching with URL per each binary set.
On slower machines, it takes more than five minutes to get a large
set binary and it could cause timeout of ftp control session, so
getting multiple binary sets in a single ftp session always fails.
Briefly tested on HP 9000/425e with 9.1 tree and ftp.netbsd.org binaries.
No particular comments on tech-install@ and port-hp300@.
Maybe should be pulled up to netbsd-9.
To generate a diff of this commit:
cvs rdiff -u -r1.27.40.1 -r1.27.40.2 src/distrib/amiga/miniroot/install.md
cvs rdiff -u -r1.15 -r1.15.38.1 src/distrib/hp300/miniroot/install.md
cvs rdiff -u -r1.4 -r1.4.56.1 src/distrib/mac68k/miniroot/install.md
cvs rdiff -u -r1.25 -r1.25.40.1 src/distrib/miniroot/install.sh
cvs rdiff -u -r1.45.56.1 -r1.45.56.2 src/distrib/miniroot/install.sub
cvs rdiff -u -r1.35 -r1.35.36.1 src/distrib/miniroot/list
cvs rdiff -u -r1.22 -r1.22.56.1 src/distrib/miniroot/upgrade.sh
cvs rdiff -u -r1.6 -r1.6.40.1 src/distrib/mvme68k/miniroot/install.md
cvs rdiff -u -r1.3 -r1.3.56.1 src/distrib/sun2/miniroot/install.md
cvs rdiff -u -r1.3 -r1.3.56.1 src/distrib/sun3/miniroot/install.md
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.