Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-8]: src/distrib Pull up following revision(s) (requested by tsuts...
details: https://anonhg.NetBSD.org/src/rev/5650a0341095
branches: netbsd-8
changeset: 947887:5650a0341095
user: martin <martin%NetBSD.org@localhost>
date: Sat Dec 19 19:02:52 2020 +0000
description:
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.
diffstat:
distrib/amiga/miniroot/install.md | 6 +-
distrib/hp300/miniroot/install.md | 11 +-
distrib/mac68k/miniroot/install.md | 11 +-
distrib/miniroot/install.sh | 38 +++---
distrib/miniroot/install.sub | 186 +++++++++++++++++++----------------
distrib/miniroot/list | 4 +-
distrib/miniroot/upgrade.sh | 24 ++--
distrib/mvme68k/miniroot/install.md | 6 +-
distrib/sun2/miniroot/install.md | 8 +-
distrib/sun3/miniroot/install.md | 8 +-
10 files changed, 166 insertions(+), 136 deletions(-)
diffs (truncated from 1048 to 300 lines):
diff -r 06798a2336ab -r 5650a0341095 distrib/amiga/miniroot/install.md
--- a/distrib/amiga/miniroot/install.md Sat Dec 19 13:43:04 2020 +0000
+++ b/distrib/amiga/miniroot/install.md Sat Dec 19 19:02:52 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: install.md,v 1.27.40.1 2017/09/23 17:01:59 snj Exp $
+# $NetBSD: install.md,v 1.27.40.2 2020/12/19 19:02:52 martin Exp $
#
#
# Copyright (c) 1996,2006 The NetBSD Foundation, Inc.
@@ -152,7 +152,7 @@
md_welcome_banner() {
if [ "$MODE" = "install" ]; then
echo ""
- echo "Welcome to the NetBSD/amiga ${VERSION} installation program."
+ echo "Welcome to the NetBSD/${MACHINE} ${RELEASE} installation program."
cat << \__welcome_banner_1
This program is designed to help you put NetBSD on your disk,
@@ -163,7 +163,7 @@
else
echo ""
- echo "Welcome to the NetBSD/amiga ${VERSION} upgrade program."
+ echo "Welcome to the NetBSD/${MACHINE} ${RELEASE} upgrade program."
cat << \__welcome_banner_2
This program is designed to help you upgrade your NetBSD system in a
diff -r 06798a2336ab -r 5650a0341095 distrib/hp300/miniroot/install.md
--- a/distrib/hp300/miniroot/install.md Sat Dec 19 13:43:04 2020 +0000
+++ b/distrib/hp300/miniroot/install.md Sat Dec 19 19:02:52 2020 +0000
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $NetBSD: install.md,v 1.15 2011/02/06 18:26:51 tsutsui Exp $
+# $NetBSD: install.md,v 1.15.38.1 2020/12/19 19:02:52 martin Exp $
#
# Copyright (c) 1996 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -35,7 +35,7 @@
#
# Machine-dependent install sets
-MDSETS=""
+MDSETS="kern-GENERIC xbase xcomp xetc xfont xserver"
md_set_term() {
if [ ! -z "$TERM" ]; then
@@ -83,6 +83,11 @@
dmesg | awk -F : '/^le[0-9]*:/ { print $1; }' | sort -u
}
+md_get_partition_range() {
+ # return an expression describing the valid partition id's
+ echo '[a-h]'
+}
+
md_installboot() {
# $1 is the root disk
@@ -470,7 +475,7 @@
md_welcome_banner() {
(
echo ""
- echo "Welcome to the NetBSD/hp300 ${VERSION} installation program."
+ echo "Welcome to the NetBSD/${MACHINE} ${RELEASE} installation program."
cat << \__welcome_banner_1
This program is designed to help you install NetBSD on your system in a
diff -r 06798a2336ab -r 5650a0341095 distrib/mac68k/miniroot/install.md
--- a/distrib/mac68k/miniroot/install.md Sat Dec 19 13:43:04 2020 +0000
+++ b/distrib/mac68k/miniroot/install.md Sat Dec 19 19:02:52 2020 +0000
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $NetBSD: install.md,v 1.4 2008/04/30 13:10:48 martin Exp $
+# $NetBSD: install.md,v 1.4.56.1 2020/12/19 19:02:52 martin Exp $
#
# Copyright (c) 1996 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -35,7 +35,7 @@
#
# Machine-dependent install sets
-MDSETS=""
+MDSETS="kern-GENERIC xbase xcomp xetc xfont xserver"
md_set_term() {
if [ ! -z "$TERM" ]; then
@@ -83,6 +83,11 @@
dmesg | awk -F : '/^sn[0-9]*:/ { print $1; }' | sort -u
}
+md_get_partition_range() {
+ # return an expression describing the valid partition id's
+ echo '[a-h]'
+}
+
md_installboot() {
# $1 is the root disk
@@ -122,7 +127,7 @@
md_welcome_banner() {
(
echo ""
- echo "Welcome to the NetBSD/mac68k ${VERSION} installation program."
+ echo "Welcome to the NetBSD/${MACHINE} ${RELEASE} installation program."
cat << \__welcome_banner_1
This program is designed to help you install NetBSD on your system in a
diff -r 06798a2336ab -r 5650a0341095 distrib/miniroot/install.sh
--- a/distrib/miniroot/install.sh Sat Dec 19 13:43:04 2020 +0000
+++ b/distrib/miniroot/install.sh Sat Dec 19 19:02:52 2020 +0000
@@ -1,5 +1,5 @@
#!/bin/sh
-# $NetBSD: install.sh,v 1.25 2009/09/20 22:44:06 abs Exp $
+# $NetBSD: install.sh,v 1.25.40.1 2020/12/19 19:02:52 martin Exp $
#
# Copyright (c) 1996,1997,1999,2000,2006 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -64,8 +64,8 @@
# we need to make sure .'s below work if this directory is not in $PATH
# dirname may not be available but expr is
-Mydir=`expr $0 : '^\(.*\)/[^/]*$'`
-Mydir=`cd ${Mydir:-.}; pwd`
+Mydir=$(expr $0 : '^\(.*\)/[^/]*$')
+Mydir=$(cd ${Mydir:-.}; pwd)
# this is the most likely place to find the binary sets
# so save them having to type it in
@@ -114,7 +114,7 @@
test "$md_view_labels_possible" && md_view_labels
-while [ "X${ROOTDISK}" = "X" ]; do
+while [ -z "${ROOTDISK}" ]; do
getrootdisk
done
@@ -144,8 +144,8 @@
echo "${ROOTDISK}a /" > ${FILESYSTEMS}
-resp="X" # force at least one iteration
-while [ "X$resp" != X"done" ]; do
+resp="not-done" # force at least one iteration
+while [ "$resp" != "done" ]; do
echo ""
echo -n "Device name? [RETURN if you already entered all devices] "
getresp "done"
@@ -154,19 +154,19 @@
;;
*)
- _device_name=`basename $resp`
+ _device_name=$(basename $resp)
# force at least one iteration
_first_char="X"
- while [ "X${_first_char}" != X"/" ]; do
+ while [ "${_first_char}" != "/" ]; do
echo -n "Mount point? "
getresp ""
_mount_point=$resp
- if [ "X${_mount_point}" = X"/" ]; then
+ if [ "${_mount_point}" = "/" ]; then
# Invalid response; no multiple roots
_first_char="X"
else
- _first_char=`firstchar ${_mount_point}`
+ _first_char=$(firstchar ${_mount_point})
fi
done
echo "${_device_name} ${_mount_point}" >> ${FILESYSTEMS}
@@ -177,7 +177,7 @@
# configure swap
resp="" # force at least one iteration
-while [ "X${resp}" = X"" ]; do
+while [ -z "${resp}" ]; do
echo -n "Ok to configure ${ROOTDISK}b as a swap device? [] "
getresp ""
case "$resp" in
@@ -236,10 +236,10 @@
y*|Y*)
resp="" # force at least one iteration
if [ -f /etc/myname ]; then
- resp=`cat /etc/myname`
+ resp=$(cat /etc/myname)
fi
echo -n "Enter system hostname: [$resp] "
- while [ "X${resp}" = X"" ]; do
+ while [ -z "${resp}" ]; do
getresp "$resp"
done
hostname $resp
@@ -247,7 +247,7 @@
echo -n "Enter DNS domain name: "
getresp "none"
- if [ "X${resp}" != X"none" ]; then
+ if [ "${resp:-none}" != "none" ]; then
FQDN=$resp
fi
@@ -255,7 +255,7 @@
echo -n "Enter IP address of default route: [none] "
getresp "none"
- if [ "X${resp}" != X"none" ]; then
+ if [ "${resp:-none}" != "none" ]; then
route delete default > /dev/null 2>&1
if route add default $resp > /dev/null ; then
echo $resp > /tmp/mygate
@@ -263,11 +263,11 @@
fi
resp="none"
- if [ X${FQDN} != X ]; then
+ if [ -n "${FQDN}" ]; then
echo -n "Enter IP address of primary nameserver: [none] "
getresp "none"
fi
- if [ "X${resp}" != X"none" ]; then
+ if [ "${resp:-none}" != "none" ]; then
echo "domain $FQDN" > /tmp/resolv.conf
echo "nameserver $resp" >> /tmp/resolv.conf
echo "search $FQDN" >> /tmp/resolv.conf
@@ -377,7 +377,7 @@
mount | while read line; do
set -- $line
- if [ "$2" = "/" -a "$3" = "nfs" ]; then
+ if [ "$2" = "/" ] && [ "$3" = "nfs" ]; then
echo "You appear to be running diskless."
echo -n "Are the install sets on one of your currently mounted filesystems? [n] "
getresp "n"
@@ -427,7 +427,7 @@
echo "No /dev/MAKEDEV installed, something is wrong here..."
else
echo -n "Making devices..."
- pid=`twiddle`
+ pid=$(twiddle)
cd /mnt/dev
sh MAKEDEV all
kill $pid
diff -r 06798a2336ab -r 5650a0341095 distrib/miniroot/install.sub
--- a/distrib/miniroot/install.sub Sat Dec 19 13:43:04 2020 +0000
+++ b/distrib/miniroot/install.sub Sat Dec 19 19:02:52 2020 +0000
@@ -1,5 +1,5 @@
#!/bin/sh
-# $NetBSD: install.sub,v 1.45.56.1 2017/09/23 17:01:59 snj Exp $
+# $NetBSD: install.sub,v 1.45.56.2 2020/12/19 19:02:52 martin Exp $
#
# Copyright (c) 1996 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -32,10 +32,14 @@
# NetBSD installation/upgrade script - common subroutines.
ROOTDISK="" # filled in below
+MACHINE= # filled by distrib/miniroot/list
+export MACHINE
VERSION= # filled in automatically (see list)
export VERSION
+RELEASE= # filled in automatically (see list)
+export RELEASE
-ALLSETS="base comp etc games man misc text" # default install sets
+ALLSETS="base comp etc games man misc modules text" # default install sets
UPGRSETS="base comp games man misc text" # default upgrade sets
THESETS= # one of the above
@@ -53,7 +57,7 @@
getresp() {
read resp
- if [ "X$resp" = "X" ]; then
+ if [ -z "$resp" ]; then
resp=$1
fi
}
@@ -114,8 +118,7 @@
read _a; set -- $_a
IFS="$_oifs"
if [ "$1" = "" ]; then return; fi
- while [ "$#" -gt 10 ]; do shift 10; done
- eval echo \$$#
+ eval echo '"${'"$#"'}"'
}
firstchar () {
@@ -135,8 +138,7 @@
IFS="/"
set -- $1
IFS="$_oifs"
- while [ "$#" -gt 10 ]; do shift 10; done
- eval echo \$$#
+ eval echo '"${'"$#"'}"'
}
Home |
Main Index |
Thread Index |
Old Index