From nobody Sat Feb 03 01:31:38 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TRZqb1lQ4z58jhV; Sat, 3 Feb 2024 01:31:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TRZqb0xFlz4PpC; Sat, 3 Feb 2024 01:31:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706923899; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vRRIUeBzZtwYJ6a0WV+Fglu1XFTYT6JLhqWSn5rJqYA=; b=Zj0UdrmG1fM509/Y7CONCOyvfPriAO9+zhF6oKrX8LgegPLrhhS+Q+42/nmKsGWN6iQWns FoMZWg1fssQvSvNNtH6xrRGtMQJol6lu/E5LJUoP5CQNjhu6yP1R9W2dwig8qWEgBVhsAq 0NVlFbLuwbRS2Zt6GWbO8ZKazKdandHAK4cYfYc7emFobbR3C9HK81S8Ve4SWBeEVdbDYJ dxvRKr8VsEklQLUTdZoi9y+WcBsIOWxsy0K/seSduK74eK2lg5Cjh2nILEG8ANJkVbJlIL J3hPB5hoyd8/qSZznx065KSGLoprYHj5arlBcH9RC8r498i8w2y1Hf/n+RJjUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706923899; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vRRIUeBzZtwYJ6a0WV+Fglu1XFTYT6JLhqWSn5rJqYA=; b=VlEwWayRODrYG3+F4/U+ay7L8yyi02YPryJWAJ+DVcaHOzly/AjpEOzL9EwoC4P6uU181Z M8UaSHidOMj3iOFiys9qfuyp4QgBLh4C2CcbbyNyEWepptt0wseHNIeoDuUNrGSBBxD9Z2 wQMaH6jXBWxDFXk84GYgUzWWhr63MiYWlY5Q7xpKN/UTaUH1tf4HVzkGE8eunLJ/Zj9zaX ST0L9xDD0kB1NVxO95BEWE9vfyLCLTFhQzgPvz4rrAwyWxpvZGjZM6GJG0zkCdMRFZFWB5 r/A2tbvMX+ijmMnfgdUhI6EF1Hm705pnK4hlHLe51vbz9kEk3WKAOWLDw2CSHg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706923899; a=rsa-sha256; cv=none; b=X8k5BLlIQprIz4ePHump9os6UQx8orAzPfXu7V1OznB/q5KazfNXphiStCS10fE6hMLX8A YJ35JkcDmFA1nUJLaskLv4fIyPyZD9CZKGR8oAdeMv1nV8nt9nIEqWFB2bi6fH/bxaxeC9 yjBlxS/sTLbjB1JCxqnxZiZUE+RHPXrNw+d3IJuTz0O2tw0TpLEsle4Z8ckZUx5aO3wZt3 PuUn7MKaUD9FqMulN72S7A2S0FNy9A9mZL4/ZGg/q0mLClE13KwHx2MlWC+w1SypqsTbMB AjYG+l/Eez/lq4TfJnhzraRVVXgkFKVF2uqGJpP5Gq1hrNR6S5bNQ7ROnFAaGA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TRZqb00D3ztBJ; Sat, 3 Feb 2024 01:31:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 4131VcKJ009773; Sat, 3 Feb 2024 01:31:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4131Vc04009770; Sat, 3 Feb 2024 01:31:38 GMT (envelope-from git) Date: Sat, 3 Feb 2024 01:31:38 GMT Message-Id: <202402030131.4131Vc04009770@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: 7143521f4cbc - main - Revert "bsdinstall: separate out dist selection in prep for pkgbase support" List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7143521f4cbc253884a001e9512920a8fe067837 Auto-Submitted: auto-generated The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=7143521f4cbc253884a001e9512920a8fe067837 commit 7143521f4cbc253884a001e9512920a8fe067837 Author: Jessica Clarke AuthorDate: 2024-02-03 01:31:11 +0000 Commit: Jessica Clarke CommitDate: 2024-02-03 01:31:11 +0000 Revert "bsdinstall: separate out dist selection in prep for pkgbase support" Firstly, my review comments were not addressed and instead totally ignored. Secondly, and a more valid justification for the revert, this completely breaks the installer, since selectdists isn't installed. Given the blatant lack of testing, back out this commit until it has actually been tested and review comments taken on board so that the installer actually works. This reverts commit 009d3f66cb5f0cf3f1d353f311d3a6878b2a534e. --- usr.sbin/bsdinstall/scripts/auto | 40 ++++++++++++++---- usr.sbin/bsdinstall/scripts/selectdists | 73 --------------------------------- usr.sbin/bsdinstall/startbsdinstall | 1 - 3 files changed, 32 insertions(+), 82 deletions(-) diff --git a/usr.sbin/bsdinstall/scripts/auto b/usr.sbin/bsdinstall/scripts/auto index c651d654d62e..9f4b5b52fe5d 100755 --- a/usr.sbin/bsdinstall/scripts/auto +++ b/usr.sbin/bsdinstall/scripts/auto @@ -153,10 +153,36 @@ trap true SIGINT # This section is optional trap error SIGINT # Catch cntrl-C here if [ -z "$BSDINSTALL_SKIP_HOSTNAME" ]; then bsdinstall hostname || error "Set hostname failed"; fi -if [ -n "$BSDINSTALL_USE_DISTRIBUTIONS" ]; then - exec 5>&1 - export DISTRIBUTIONS=$( `dirname $0`/selectdists 2>&1 1>&5 ) - exec 5>&- +export DISTRIBUTIONS="${DISTRIBUTIONS:-base.txz kernel.txz}" +if [ -f $BSDINSTALL_DISTDIR/MANIFEST ]; then + DISTMENU=`awk -F'\t' '!/^(kernel\.txz|base\.txz)/{print $1,$5,$6}' $BSDINSTALL_DISTDIR/MANIFEST` + DISTMENU="$(echo ${DISTMENU} | sed -E 's/\.txz//g')" + + if [ -n "$DISTMENU" ]; then + exec 5>&1 + EXTRA_DISTS=$( eval bsddialog \ + --backtitle \"$OSNAME Installer\" \ + --title \"Distribution Select\" --nocancel --separate-output \ + --checklist \"Choose optional system components to install:\" \ + 0 0 0 $DISTMENU \ + 2>&1 1>&5 ) + for dist in $EXTRA_DISTS; do + export DISTRIBUTIONS="$DISTRIBUTIONS $dist.txz" + done + fi +fi + +FETCH_DISTRIBUTIONS="" +for dist in $DISTRIBUTIONS; do + if [ ! -f $BSDINSTALL_DISTDIR/$dist ]; then + FETCH_DISTRIBUTIONS="$FETCH_DISTRIBUTIONS $dist" + fi +done + +if [ -n "$FETCH_DISTRIBUTIONS" -a -n "$BSDINSTALL_CONFIGCURRENT" ]; then + bsddialog --backtitle "$OSNAME Installer" --title "Network Installation" --msgbox "Some installation files were not found on the boot volume. The next few screens will allow you to configure networking so that they can be downloaded from the Internet." 0 0 + bsdinstall netconfig || error + NETCONFIG_DONE=yes fi rm -f $PATH_FSTAB @@ -321,10 +347,8 @@ if [ -n "$FETCH_DISTRIBUTIONS" ]; then [ $FETCH_RESULT -ne 0 ] && error "Could not fetch remote distributions" fi -if [ -n "$BSDINSTALL_USE_DISTRIBUTIONS" ]; then - bsdinstall checksum || error "Distribution checksum failed" - bsdinstall distextract || error "Distribution extract failed" -fi +bsdinstall checksum || error "Distribution checksum failed" +bsdinstall distextract || error "Distribution extract failed" # Set up boot loader bsdinstall bootconfig || error "Failed to configure bootloader" diff --git a/usr.sbin/bsdinstall/scripts/selectdists b/usr.sbin/bsdinstall/scripts/selectdists deleted file mode 100644 index b548e82a95f8..000000000000 --- a/usr.sbin/bsdinstall/scripts/selectdists +++ /dev/null @@ -1,73 +0,0 @@ -#!/bin/sh -#- -# Copyright (c) 2011 Nathan Whitehorn -# Copyright (c) 2013-2018 Devin Teske -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -# SUCH DAMAGE. -# -# -############################################################ INCLUDES - -BSDCFG_SHARE="/usr/share/bsdconfig" -. $BSDCFG_SHARE/common.subr || exit 1 - -############################################################ CONFIGURATION - -# -# Default distributions -# -DISTRIBUTIONS="${DISTRIBUTIONS:-base.txz kernel.txz}" - -############################################################ MAIN - -if [ -f $BSDINSTALL_DISTDIR/MANIFEST ]; then - DISTMENU=`awk -F'\t' '!/^(kernel\.txz|base\.txz)/{print $1,$5,$6}' $BSDINSTALL_DISTDIR/MANIFEST` - DISTMENU="$(echo ${DISTMENU} | sed -E 's/\.txz//g')" - - if [ -n "$DISTMENU" ]; then - EXTRA_DISTS=$( eval bsddialog \ - --backtitle \"$OSNAME Installer\" \ - --title \"Distribution Select\" --nocancel --separate-output \ - --checklist \"Choose optional system components to install:\" \ - 0 0 0 $DISTMENU \ - 2>&1 >&3 ) - for dist in $EXTRA_DISTS; do - DISTRIBUTIONS="$DISTRIBUTIONS $dist.txz" - done - fi -fi - -FETCH_DISTRIBUTIONS="" -for dist in $DISTRIBUTIONS; do - if [ ! -f $BSDINSTALL_DISTDIR/$dist ]; then - FETCH_DISTRIBUTIONS="$FETCH_DISTRIBUTIONS $dist" - fi -done - -if [ -n "$FETCH_DISTRIBUTIONS" -a -n "$BSDINSTALL_CONFIGCURRENT" ]; then - bsddialog --backtitle "$OSNAME Installer" --title "Network Installation" --msgbox "Some installation files were not found on the boot volume. The next few screens will allow you to configure networking so that they can be downloaded from the Internet." 0 0 - bsdinstall netconfig || error - NETCONFIG_DONE=yes -fi - -echo $DISTRIBUTIONS >&2 diff --git a/usr.sbin/bsdinstall/startbsdinstall b/usr.sbin/bsdinstall/startbsdinstall index 8d9fb981c11d..63239c969ac6 100644 --- a/usr.sbin/bsdinstall/startbsdinstall +++ b/usr.sbin/bsdinstall/startbsdinstall @@ -6,7 +6,6 @@ : ${BSDDIALOG_EXTRA=3} : ${BSDDIALOG_ESC=5} : ${BSDDIALOG_ERROR=255} -export BSDINSTALL_USE_DISTRIBUTIONS=y kbdcontrol -d >/dev/null 2>&1 if [ $? -eq 0 ]; then