Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-9]: src/distrib Pull up following revision(s) (requested by tsuts...
details: https://anonhg.NetBSD.org/src/rev/24023255d4b5
branches: netbsd-9
changeset: 947509:24023255d4b5
user: martin <martin%NetBSD.org@localhost>
date: Mon Dec 14 17:26:36 2020 +0000
description:
Pull up following revision(s) (requested by tsutsui in ticket #1151):
distrib/miniroot/install.sub: revision 1.54
distrib/miniroot/install.sub: revision 1.55
distrib/miniroot/install.sub: revision 1.56
distrib/miniroot/install.sub: revision 1.57
distrib/miniroot/install.sub: revision 1.58
distrib/miniroot/install.sub: revision 1.59
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/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/hp300/miniroot/install.md: revision 1.18
distrib/hp300/miniroot/install.md: revision 1.19
distrib/miniroot/install.sub: revision 1.53
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.
-
Add modules set for default sets on miniroot installation.
Should be pulled up to netbsd-9 and netbsd-8.
-
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.
-
Appease awk warnings on suppressing dmesg timestamps.
awk: warning: escape sequence `\[' treated as plain `['
source line number 1
context is
{ h=$0; >>> gsub("^[ <<<
awk: warning: escape sequence `\]' treated as plain `]'
source line number 1
Should be pulled up to netbsd-9.
-
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.
-
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.
diffstat:
distrib/amiga/miniroot/install.md | 6 ++--
distrib/hp300/miniroot/install.md | 11 +++++--
distrib/mac68k/miniroot/install.md | 11 +++++--
distrib/miniroot/install.sub | 54 ++++++++++++++++++++++++++----------
distrib/miniroot/list | 4 +-
distrib/mvme68k/miniroot/install.md | 6 ++--
distrib/sun2/miniroot/install.md | 8 ++--
distrib/sun3/miniroot/install.md | 8 ++--
8 files changed, 70 insertions(+), 38 deletions(-)
diffs (truncated from 362 to 300 lines):
diff -r 890b54366e53 -r 24023255d4b5 distrib/amiga/miniroot/install.md
--- a/distrib/amiga/miniroot/install.md Sat Dec 12 20:30:03 2020 +0000
+++ b/distrib/amiga/miniroot/install.md Mon Dec 14 17:26:36 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: install.md,v 1.30 2019/04/10 14:52:53 christos Exp $
+# $NetBSD: install.md,v 1.30.2.1 2020/12/14 17:26:37 martin Exp $
#
#
# Copyright (c) 1996,2006 The NetBSD Foundation, Inc.
@@ -140,7 +140,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,
@@ -151,7 +151,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 890b54366e53 -r 24023255d4b5 distrib/hp300/miniroot/install.md
--- a/distrib/hp300/miniroot/install.md Sat Dec 12 20:30:03 2020 +0000
+++ b/distrib/hp300/miniroot/install.md Mon Dec 14 17:26:36 2020 +0000
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $NetBSD: install.md,v 1.17 2019/04/10 14:52:53 christos Exp $
+# $NetBSD: install.md,v 1.17.2.1 2020/12/14 17:26:37 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 @@
mi_filter_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 890b54366e53 -r 24023255d4b5 distrib/mac68k/miniroot/install.md
--- a/distrib/mac68k/miniroot/install.md Sat Dec 12 20:30:03 2020 +0000
+++ b/distrib/mac68k/miniroot/install.md Mon Dec 14 17:26:36 2020 +0000
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $NetBSD: install.md,v 1.5 2019/04/10 14:52:53 christos Exp $
+# $NetBSD: install.md,v 1.5.2.1 2020/12/14 17:26:37 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 @@
mi_filter_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 890b54366e53 -r 24023255d4b5 distrib/miniroot/install.sub
--- a/distrib/miniroot/install.sub Sat Dec 12 20:30:03 2020 +0000
+++ b/distrib/miniroot/install.sub Mon Dec 14 17:26:36 2020 +0000
@@ -1,5 +1,5 @@
#!/bin/sh
-# $NetBSD: install.sub,v 1.48.2.3 2020/01/21 15:26:46 martin Exp $
+# $NetBSD: install.sub,v 1.48.2.4 2020/12/14 17:26:36 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
-VERSION=89936
+MACHINE= # filled by distrib/miniroot/list
+export MACHINE
+VERSION=100 # updated by distrib/miniroot/list
export VERSION
+RELEASE=10.0 # updated by distrib/miniroot/list
+export RELEASE
-ALLSETS="base comp etc games man misc rescue text" # default install sets
+ALLSETS="base comp etc games man misc modules rescue text" # default install sets
UPGRSETS="base comp games man misc text" # default upgrade sets
THESETS= # one of the above
@@ -523,7 +527,7 @@
echo -n "configuring network interfaces:"
for i in $tmp; do
eval $(echo 'args=$ifconfig_'$i)
- if [ ! -z "$args" ]; then
+ if [ -n "$args" ]; then
echo -n " $i"
ifconfig $i $args
elif [ -f /mnt/etc/ifconfig.$i ]; then
@@ -555,7 +559,7 @@
read af name mask bcaddr extras
read dt dtaddr
- if [ ! -n "$name" ]; then
+ if [ -z "$name" ]; then
echo "/etc/hostname.$1: invalid network configuration file"
exit
fi
@@ -678,6 +682,10 @@
installation sets. When you enter a '?' you will see a listing of the
current directory on the server.
__install_ftp_2
+ echo ""
+ echo "The default installation directory in the official ftp server is:"
+ echo "/pub/NetBSD/NetBSD-${RELEASE}/${MACHINE}/binary/sets"
+
_sets=""
while [ -z "$_sets" ]
do
@@ -713,10 +721,19 @@
if [ $resp = '?' ]; then
sh /tmp/ftp-dir.sh
else
- _sets=$(sh /tmp/ftp-dir.sh | sh /tmp/fname_filter.sh)
+ _sets=$(sh /tmp/ftp-dir.sh | sort -u | sh /tmp/fname_filter.sh)
fi
done
rm -f /tmp/ftp-dir.sh /tmp/fname_filter.sh
+ rm -f /tmp/ftp-script.sh
+
+ # Prepare ftp-fetch script to fetch binary sets
+ _download_dir=INSTALL
+ _ftp_opts=""
+ _ftp_url="ftp://$_ftp_server_login:$_ftp_server_password@$_ftp_server_ip$_ftp_server_dir/"
+ echo "#!/bin/sh" > /tmp/ftp-fetch.sh
+ echo "cd /mnt" >> /tmp/ftp-fetch.sh
+ echo "mkdir -p $_download_dir" >> /tmp/ftp-fetch.sh
while : ; do
echo "The following sets are available for extraction:"
@@ -737,7 +754,7 @@
echo ""
# Get name of the file and add extraction command
- # to the ftp-script.
+ # to the ftp-fetch script.
if [ -z "$_next" ]; then resp=n; else resp=y; fi
echo -n "Continue to add filenames [$resp]? "
getresp "$resp"
@@ -748,8 +765,16 @@
echo -n "File name [$_next]? "
getresp "$_next"
if isin $resp $_sets; then
- echo "get $resp |\"pax -zr${verbose_flag}pe\"" >> \
- /tmp/ftp-script.sh
+ echo "echo Fetching $resp:" >> \
+ /tmp/ftp-fetch.sh
+ echo "ftp ${_ftp_opts} -o $_download_dir/$resp ${_ftp_url}$resp" >> \
+ /tmp/ftp-fetch.sh
+ echo "echo Extracting $resp:" >> \
+ /tmp/ftp-fetch.sh
+ echo "pax -zr${verbose_flag}pe -f $_download_dir/$resp" >> \
+ /tmp/ftp-fetch.sh
+ echo "rm -f $_download_dir/$resp" >> \
+ /tmp/ftp-fetch.sh
_setsdone="$resp $_setsdone"
else
echo "You entered an invalid filename."
@@ -757,11 +782,8 @@
fi
done
- echo "quit" >> /tmp/ftp-script.sh
- echo "__end_commands" >> /tmp/ftp-script.sh
-
- sh /tmp/ftp-script.sh
- rm -f /tmp/ftp-script.sh
+ sh /tmp/ftp-fetch.sh
+ rm -f /tmp/ftp-fetch.sh
echo "Extraction complete."
}
@@ -1047,7 +1069,7 @@
__mount_a_disk_2
_md_fstype=$(md_native_fstype)
_md_fsopts=$(md_native_fsopts)
- if [ ! -z "$_md_fstype" ]; then
+ if [ -n "$_md_fstype" ]; then
echo " 3) $_md_fstype"
else
_md_fstype="_undefined_"
@@ -1611,6 +1633,6 @@
mi_filter_dmesg() {
# Remove timestemps, sort.
- dmesg | awk '{ h=$0; gsub("^\[[0-9. ]*\] ", "", h); print h; }' \
+ dmesg | awk '{ h=$0; gsub("^[[0-9. ]*] ", "", h); print h; }' \
| sort -u
}
diff -r 890b54366e53 -r 24023255d4b5 distrib/miniroot/list
--- a/distrib/miniroot/list Sat Dec 12 20:30:03 2020 +0000
+++ b/distrib/miniroot/list Mon Dec 14 17:26:36 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: list,v 1.35 2011/06/19 06:48:07 tsutsui Exp $
+# $NetBSD: list,v 1.35.46.1 2020/12/14 17:26:37 martin Exp $
SRCDIRS bin sbin usr.bin usr.sbin
@@ -71,5 +71,5 @@
# and the installation scripts
COPY ${CURDIR}/install.sh install 555
COPY ${CURDIR}/upgrade.sh upgrade 555
-CMD sed "/^VERSION=/s/=.*/=${DISTRIBREV}/" < ${CURDIR}/install.sub > install.sub
+CMD sed -e "/^VERSION=/s/=.*/=${DISTRIBREV}/" -e "/^RELEASE=/s/=.*/=${DISTRIBVER}/" -e "/^MACHINE=/s/=.*/=${MACHINE}/" < ${CURDIR}/install.sub > install.sub
MTREE ./install.sub type=file uname=root gname=wheel mode=0444
diff -r 890b54366e53 -r 24023255d4b5 distrib/mvme68k/miniroot/install.md
--- a/distrib/mvme68k/miniroot/install.md Sat Dec 12 20:30:03 2020 +0000
+++ b/distrib/mvme68k/miniroot/install.md Mon Dec 14 17:26:36 2020 +0000
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $NetBSD: install.md,v 1.8 2019/04/10 14:52:53 christos Exp $
+# $NetBSD: install.md,v 1.8.2.1 2020/12/14 17:26:37 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
@@ -176,7 +176,7 @@
}
md_welcome_banner() {
- echo "Welcome to the NetBSD/mvme68k ${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 simple
diff -r 890b54366e53 -r 24023255d4b5 distrib/sun2/miniroot/install.md
--- a/distrib/sun2/miniroot/install.md Sat Dec 12 20:30:03 2020 +0000
+++ b/distrib/sun2/miniroot/install.md Mon Dec 14 17:26:36 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: install.md,v 1.5 2019/04/10 14:52:53 christos Exp $
+# $NetBSD: install.md,v 1.5.2.1 2020/12/14 17:26:37 martin Exp $
#
#
# Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
Home |
Main Index |
Thread Index |
Old Index