From nobody Tue Apr 29 00:35:14 2025 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 4ZmhDM152wz5v7HR; Tue, 29 Apr 2025 00:35:15 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZmhDL1b67z3dF9; Tue, 29 Apr 2025 00:35:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1745886914; 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=8f6DgHnOq7kvxDk0t4tgjhTLemramJNiJrdOG/iDDTQ=; b=KKcEpLdoFoirIR9/fhRlJ4Ng67Ng5Fs4zUkJQ34sEZTKnikHDRhEUpgmYMTF2rsa8lQYnU O8PRd28vW7e2sFq7ghAFECHBwtYvOAxycerVbk5EJueD95e/CFGSnwkHpasojrFeB3bENn OMo4jSr59CSqKKdfQhRwHwwPHdS5qIuABf4NBtxI3iOS8EkePr7fTUXpVLc48Sq3x/yT4s ccaTAaaw7BRllzH8FqWHMU8tRHS70Imkzu04bN2Oz7/hhwpQ2VKO8HStW8GcAqa4qBqXzC pZcFg4fV78b3EJ3WeBI2LbVx6GBJFvMCfIBm+3GLA2YoamljpCf1xwaBFjILuA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1745886914; a=rsa-sha256; cv=none; b=bVW5LGVJIKW+ORvt9WkiW8qQyIqmcb1toeVAM9x+Y7Ip1BhhYQK5Tl8PakdAeSibgDjCK6 m19SvM0k4FAhD3QO5P/yjdbThp2tNhkWjFBEx/k8RqsXhL/zbr/vijbMFF3j/d45EQpYPS 1lfcN86MFGV5+ceNtbLVyGc5DzjQXF07K6HNmMIQNv+VopVF4oFcclJv23tCdVhSlHwr5x GXFT2hJThIcignY2emlrjuUaOwZM2tnsgyKs2EIicw3uNt38Xb1EOuJNvCJHeD0MY9Dsaw hbVyJMAFtX8qdbUEcTAnWEc6WkFsm8N1JBF8T4gY8EF09vaGKqmvdUwhKTDVrQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1745886914; 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=8f6DgHnOq7kvxDk0t4tgjhTLemramJNiJrdOG/iDDTQ=; b=QnfPoj9/QM/2feKIN5vH7wSeL/g0z2BzNY4gVyZDypDTcBFazhctmEWRi98lbDCWK8ewWR aQKumYPbZLEzciPp1tYv4MA4xExp/ztSpnEVjOlGWGQSy2xNNu6IqMib3VCYySShqcfwEF Ko8pt/6f+6ZE3ZGLZH7uUXQmefOoRchSIw2e82ekG5aORxwsADwMnRhhaV96vXHcStWAiT 3RGudJueEXRNoWEFoCz5hffV/HEYarFT0yqJXf9B8uYDoTaO7gE8vWRf/IZL9DSvfzC/b2 veQjBU24i5RlkQNlHDLV4jA0mZ1d4TqiMRPaqKi4vtzjFvRWhEfwAeAsrrCI/A== 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 4ZmhDL14zFzxg2; Tue, 29 Apr 2025 00:35:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 53T0ZE2a094368; Tue, 29 Apr 2025 00:35:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 53T0ZE4M094365; Tue, 29 Apr 2025 00:35:14 GMT (envelope-from git) Date: Tue, 29 Apr 2025 00:35:14 GMT Message-Id: <202504290035.53T0ZE4M094365@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 34b43f4b26e4 - main - bsdinstall: add pkgbase prompt to auto script 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: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 34b43f4b26e41a70fcb67ec5d8cf394f23b3fbf9 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=34b43f4b26e41a70fcb67ec5d8cf394f23b3fbf9 commit 34b43f4b26e41a70fcb67ec5d8cf394f23b3fbf9 Author: Isaac Freund AuthorDate: 2025-04-14 10:33:43 +0000 Commit: Ed Maste CommitDate: 2025-04-29 00:34:18 +0000 bsdinstall: add pkgbase prompt to auto script Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D49824 --- usr.sbin/bsdinstall/scripts/auto | 86 ++++++++++++++++++++++++---------------- 1 file changed, 52 insertions(+), 34 deletions(-) diff --git a/usr.sbin/bsdinstall/scripts/auto b/usr.sbin/bsdinstall/scripts/auto index 7d041be015e7..339c9da433b2 100755 --- a/usr.sbin/bsdinstall/scripts/auto +++ b/usr.sbin/bsdinstall/scripts/auto @@ -153,36 +153,50 @@ 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 -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 +bsddialog --backtitle "$OSNAME Installer" --title "Select Installation Type" \ + --yes-label "Traditional" --no-label "Packages (Experimental)" --yesno \ + "Would you like to install the base system using traditional distribution sets or packages (experimental)?" 0 0 +if [ $? -eq 1 ]; then + PKGBASE=yes 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 +if [ "$PKGBASE" == yes ]; then + bsddialog --backtitle "$OSNAME Installer" --title "Network Installation" \ + --msgbox "Installation of base system packages currently requires internet access. The next few screens will allow you to configure networking." 0 0 bsdinstall netconfig || error NETCONFIG_DONE=yes +else + 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 fi rm -f $PATH_FSTAB @@ -339,16 +353,20 @@ esac [ -f /usr/libexec/bsdinstall/local.pre-fetch ] && f_dprintf "Running local.pre-fetch" && sh /usr/libexec/bsdinstall/local.pre-fetch "$BSDINSTALL_CHROOT" -if [ -n "$FETCH_DISTRIBUTIONS" ]; then - exec 5>&1 - export BSDINSTALL_DISTDIR=$(`dirname $0`/fetchmissingdists 2>&1 1>&5) - FETCH_RESULT=$? - exec 5>&- +if [ "$PKGBASE" == yes ]; then + bsdinstall pkgbase || error "Installation of base system packages failed" +else + if [ -n "$FETCH_DISTRIBUTIONS" ]; then + exec 5>&1 + export BSDINSTALL_DISTDIR=$(`dirname $0`/fetchmissingdists 2>&1 1>&5) + FETCH_RESULT=$? + exec 5>&- - [ $FETCH_RESULT -ne 0 ] && error "Could not fetch remote distributions" + [ $FETCH_RESULT -ne 0 ] && error "Could not fetch remote distributions" + fi + 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"