NetBSD Problem Report #54835
From tsutsui@ceres.dti.ne.jp Sun Jan 5 15:59:18 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 9DD2C7A1A4
for <gnats-bugs@gnats.NetBSD.org>; Sun, 5 Jan 2020 15:59:18 +0000 (UTC)
Message-Id: <202001051559.005Fx7jl029238@ceres.dti.ne.jp>
Date: Mon, 6 Jan 2020 00:59:07 +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.sub uses sh(1) function not enabled with SMALL
X-Send-Pr-Version: 3.95
>Number: 54835
>Category: install
>Synopsis: miniroot install.sub uses sh(1) function not enabled with SMALL
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: tsutsui
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Jan 05 16:00:00 +0000 2020
>Closed-Date: Sat Feb 01 05:40:34 +0000 2020
>Last-Modified: Tue Aug 30 18:40:03 +0000 2022
>Originator: Izumi Tsutsui
>Release: NetBSD 9.0_RC1
>Organization:
>Environment:
NetBSD 9.0_RC1 (INSTALL) #0: Wed Nov 27 16:14:52 UTC 2019
mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/sun3/compile/INSTALL
Architecture: m68k
Machine: sun3, but affects all miniroot ports?
>Description:
NetBSD/sun3 9.0_RC1 miniroot script emits the following error message:
---
Installing boot block...
File system: /dev/rsd0a
File system type: ffs (blocksize 8192, needswap 0)
Primary bootstrap: bootxx
Secondary bootstrap: ufsboot
Bootstrap start sector: 1
Bootstrap byte count: 6740
Bootstrap block table: 118 entries of 8192 bytes available, 3 used: 6752 6768 2818
Writing bootstrap
done.
[: SMALL test, no fallback usage
Syncing disks...done.
Umounting filesystems... /mnt/usr /mnt Done.
---
"[: SMALL test, no fallback usage" is comes from the following line:
https://nxr.netbsd.org/xref/src/distrib/miniroot/install.sub?r=1.49#1534
---
1534 if [ ! \( -f $_fstab -a -s $_fstab \) ]; then
1535 echo "fstab empty" > /dev/tty
1536 return
1537 fi
---
# if [ ! \( -f /tmp/fstab.shadow -a -s /tmp/fstab.shadow \) ] ; then
> echo "fstab empty"
> fi
[: SMALL test, no fallback usage
#
---
It works on non-SMALL sh(1):
---
$ if [ ! \( -f /tmp/fstab.shadow -a -s /tmp/fstab.shadow \) ] ; then
> echo "fstab empty"
> fi
fstab empty
$
---
>How-To-Repeat:
Install NetBSD 9.0_RC1 via miniroot.
>Fix:
Fix install.sub script or sh(1) SMALL?
---
Izumi Tsutsui
>Release-Note:
>Audit-Trail:
From: Robert Elz <kre@munnari.OZ.AU>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: install/54835: miniroot install.sub uses sh(1) function not enabled with SMALL
Date: Mon, 06 Jan 2020 02:10:58 +0700
Date: Sun, 5 Jan 2020 16:00:01 +0000 (UTC)
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
Message-ID: <20200105160001.1A2167A1E0@mollari.NetBSD.org>
| Fix install.sub script or sh(1) SMALL?
Fix the script, the -a (etc) operators to test are deprecated.
The line should be
if ! [ -f "${_fstab}" ] || ! [ -s "${_fstab}" ]; then
kre
From: "Izumi Tsutsui" <tsutsui@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/54835 CVS commit: src/distrib/miniroot
Date: Sun, 12 Jan 2020 03:56:14 +0000
Module Name: src
Committed By: tsutsui
Date: Sun Jan 12 03:56:14 UTC 2020
Modified Files:
src/distrib/miniroot: install.sub
Log Message:
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.50 -r1.51 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:38 +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:38 +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:37 +0000
State-Changed-Why:
[pullup-9 #622]
From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/54835 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:40:34 +0000
State-Changed-Why:
Pullup complete.
From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/54835 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.
From: "Izumi Tsutsui" <tsutsui@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/54835 CVS commit: src/distrib/atari/floppies/common
Date: Sat, 20 Aug 2022 20:50:41 +0000
Module Name: src
Committed By: tsutsui
Date: Sat Aug 20 20:50:41 UTC 2022
Modified Files:
src/distrib/atari/floppies/common: dot.profile
Log Message:
Fix yet another "[: SMALL test, no fallback usage" error on installation.
The same problem as PR/54835 of the miniroot scripts, i.e.
avoid and replace use of -o binary primary marked obsolescent
by POSIX.1-2017:
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/test.html#tag_20_12
8_16
Noticed on installation of NetBSD 9.3 on TT030, and
maybe should be pulled up to netbsd-9.
To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/distrib/atari/floppies/common/dot.profile
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: "Izumi Tsutsui" <tsutsui@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/54835 CVS commit: src/distrib
Date: Sun, 28 Aug 2022 12:44:01 +0000
Module Name: src
Committed By: tsutsui
Date: Sun Aug 28 12:44:01 UTC 2022
Modified Files:
src/distrib/amiga/floppies/inst-common: dot.commonutils
src/distrib/amiga/miniroot: dot.profile
src/distrib/utils/script-installer: dot.commonutils
src/distrib/vax/inst-common: dot.commonutils
Log Message:
Avoid more obsolescent binary primaries not supported by crunched test(1).
See PR/54835 and PR/56983 for details.
To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 \
src/distrib/amiga/floppies/inst-common/dot.commonutils
cvs rdiff -u -r1.10 -r1.11 src/distrib/amiga/miniroot/dot.profile
cvs rdiff -u -r1.7 -r1.8 src/distrib/utils/script-installer/dot.commonutils
cvs rdiff -u -r1.5 -r1.6 src/distrib/vax/inst-common/dot.commonutils
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/54835 CVS commit: [netbsd-9] src/distrib
Date: Tue, 30 Aug 2022 18:35:20 +0000
Module Name: src
Committed By: martin
Date: Tue Aug 30 18:35:20 UTC 2022
Modified Files:
src/distrib/amiga/floppies/inst-common [netbsd-9]: dot.commonutils
src/distrib/amiga/miniroot [netbsd-9]: dot.profile
src/distrib/atari/floppies/common [netbsd-9]: dot.profile
src/distrib/utils/script-installer [netbsd-9]: dot.commonutils
src/distrib/vax/inst-common [netbsd-9]: dot.commonutils
Log Message:
Pull up following revision(s) (requested by tsutsui in ticket #1514):
distrib/atari/floppies/common/dot.profile: revision 1.9
distrib/vax/inst-common/dot.commonutils: revision 1.6
distrib/amiga/miniroot/dot.profile: revision 1.11
distrib/utils/script-installer/dot.commonutils: revision 1.8
distrib/amiga/floppies/inst-common/dot.commonutils: revision 1.9
Fix yet another "[: SMALL test, no fallback usage" error on installation.
The same problem as PR/54835 of the miniroot scripts, i.e.
avoid and replace use of -o binary primary marked obsolescent
by POSIX.1-2017:
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/test.html#tag_20_12
8_16
Noticed on installation of NetBSD 9.3 on TT030, and
maybe should be pulled up to netbsd-9.
Avoid more obsolescent binary primaries not supported by crunched test(1).
See PR/54835 and PR/56983 for details.
To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.8.102.1 \
src/distrib/amiga/floppies/inst-common/dot.commonutils
cvs rdiff -u -r1.10 -r1.10.64.1 src/distrib/amiga/miniroot/dot.profile
cvs rdiff -u -r1.7.6.1 -r1.7.6.2 \
src/distrib/atari/floppies/common/dot.profile
cvs rdiff -u -r1.7 -r1.7.102.1 \
src/distrib/utils/script-installer/dot.commonutils
cvs rdiff -u -r1.5 -r1.5.102.1 src/distrib/vax/inst-common/dot.commonutils
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.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2022
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.