From nobody Sat Feb 03 01:27:58 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 4TRZlc3lqhz58jps for ; Sat, 3 Feb 2024 01:28:12 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TRZlb4K1sz4PF3 for ; Sat, 3 Feb 2024 01:28:11 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=freebsd.org (policy=none); spf=pass (mx1.freebsd.org: domain of jrtc27@jrtc27.com designates 209.85.128.44 as permitted sender) smtp.mailfrom=jrtc27@jrtc27.com Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-40e800461baso22976685e9.3 for ; Fri, 02 Feb 2024 17:28:11 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706923690; x=1707528490; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YGKufzp1YpsMWdrw+o0fb/Ac1n2RAZNAVo1WvPD7SRw=; b=oG5W/UTDKqretEJDvud3CAzPaHr/up/SZVLni0uQPgUlpVam4XXHfOgQRXCwnV5FJf ESCnYsBOEUk9142iq+L4vI12CNJnsiaG5VDSGeERPyWXiXwEQFAu43laDcBL2dMsY0MW 2pqHi0+CmYXvGV/e6U9vysDDW/fuKaJfUOQox8kPlKf7YCT0OyKleSHkHVAgXYIwTHFn mK4qUvzGxa9wkqxvbw07r6CKlZjDVTi9RoB+z3JdAmd5jocIEhlPi93Xc+eZ6nAckIZq ecpEMCblBIp4asAmHE+bZ8WgvyWNSOkZKkmIA2eKFoVzbtMXInk4FCQI+/oUDLr4Q4uL Paew== X-Gm-Message-State: AOJu0YzAdJuvi9yAEDDRnxaxIR2ARKxFXz2mQBwdinTgnEyKYM+xgxRZ pofLqfb5eDmhaEb+p1oQsBZe+pZ8bUqFVuRJeI4ncSzJ02VUJjjEmZu7rJ5RZ44= X-Google-Smtp-Source: AGHT+IFvvQyGuh3xQwKTn0xLvMqIqSS/Gxuddlv6UZdZmHP0PLlp/0iL6NqkXsSfrQ6LxRlYYiOKwQ== X-Received: by 2002:a5d:4f0c:0:b0:33b:274e:af5 with SMTP id c12-20020a5d4f0c000000b0033b274e0af5mr1527495wru.60.1706923689721; Fri, 02 Feb 2024 17:28:09 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCX2812Tsv9IQZ7mq86okztVGkCKngChwJGo9CMgUeByYzPhoOG+napVWZAVxdkIWuo1oX2gb9B7a9chzOD+stUczXrJGf/MMl7CJBCtrSM38csBQrUc50bsE+XCQRV41H8PQpp+XQiVUkWo1WYO8EMkag== Received: from smtpclient.apple ([131.111.5.246]) by smtp.gmail.com with ESMTPSA id k6-20020adfe8c6000000b0033af3294417sm2982781wrn.21.2024.02.02.17.28.08 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 02 Feb 2024 17:28:09 -0800 (PST) Content-Type: text/plain; charset=utf-8 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 (Mac OS X Mail 16.0 \(3774.200.91.1.1\)) Subject: Re: git: 009d3f66cb5f - main - bsdinstall: separate out dist selection in prep for pkgbase support From: Jessica Clarke In-Reply-To: <1D1F0A7A-C735-4D6F-B333-39920E84CD5D@freebsd.org> Date: Sat, 3 Feb 2024 01:27:58 +0000 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: References: <202401312205.40VM5dQS018685@gitrepo.freebsd.org> <1D1F0A7A-C735-4D6F-B333-39920E84CD5D@freebsd.org> To: Brad Davis X-Mailer: Apple Mail (2.3774.200.91.1.1) X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.40 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.999]; MV_CASE(0.50)[]; FORGED_SENDER(0.30)[jrtc27@freebsd.org,jrtc27@jrtc27.com]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; MIME_GOOD(-0.10)[text/plain]; DMARC_POLICY_SOFTFAIL(0.10)[freebsd.org : SPF not aligned (relaxed), No valid DKIM,none]; MIME_TRACE(0.00)[0:+]; TO_DN_SOME(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; RCVD_TLS_LAST(0.00)[]; ARC_NA(0.00)[]; FREEFALL_USER(0.00)[jrtc27]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_HAS_DN(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.128.44:from]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_NEQ_ENVFROM(0.00)[jrtc27@freebsd.org,jrtc27@jrtc27.com]; RCVD_VIA_SMTP_AUTH(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-main@freebsd.org]; R_DKIM_NA(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[209.85.128.44:from] X-Rspamd-Queue-Id: 4TRZlb4K1sz4PF3 On 31 Jan 2024, at 22:15, Jessica Clarke wrote: > On 31 Jan 2024, at 22:05, Brad Davis wrote: >>=20 >> The branch main has been updated by brd: >>=20 >> URL: = https://cgit.FreeBSD.org/src/commit/?id=3D009d3f66cb5f0cf3f1d353f311d3a687= 8b2a534e >>=20 >> commit 009d3f66cb5f0cf3f1d353f311d3a6878b2a534e >> Author: Brad Davis >> AuthorDate: 2024-01-26 17:46:46 +0000 >> Commit: Brad Davis >> CommitDate: 2024-01-31 22:05:27 +0000 >>=20 >> bsdinstall: separate out dist selection in prep for pkgbase support >>=20 >> No functional change intended. >>=20 >> Approved by: asiciliano >> Sponsored by: Rubicon Communications, LLC ("Netgate") >> Differential Revision: https://reviews.freebsd.org/D43621 >> --- >> usr.sbin/bsdinstall/scripts/auto | 40 ++++-------------- >> usr.sbin/bsdinstall/scripts/selectdists | 73 = +++++++++++++++++++++++++++++++++ >> usr.sbin/bsdinstall/startbsdinstall | 1 + >> 3 files changed, 82 insertions(+), 32 deletions(-) >>=20 >> diff --git a/usr.sbin/bsdinstall/scripts/auto = b/usr.sbin/bsdinstall/scripts/auto >> index 9f4b5b52fe5d..c651d654d62e 100755 >> --- a/usr.sbin/bsdinstall/scripts/auto >> +++ b/usr.sbin/bsdinstall/scripts/auto >> @@ -153,36 +153,10 @@ 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 >>=20 >> -export DISTRIBUTIONS=3D"${DISTRIBUTIONS:-base.txz kernel.txz}" >> -if [ -f $BSDINSTALL_DISTDIR/MANIFEST ]; then >> - DISTMENU=3D`awk -F'\t' '!/^(kernel\.txz|base\.txz)/{print = $1,$5,$6}' $BSDINSTALL_DISTDIR/MANIFEST` >> - DISTMENU=3D"$(echo ${DISTMENU} | sed -E 's/\.txz//g')" >> - >> - if [ -n "$DISTMENU" ]; then >> - exec 5>&1 >> - EXTRA_DISTS=3D$( 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=3D"$DISTRIBUTIONS $dist.txz" >> - done >> - fi >> -fi >> - >> -FETCH_DISTRIBUTIONS=3D"" >> -for dist in $DISTRIBUTIONS; do >> - if [ ! -f $BSDINSTALL_DISTDIR/$dist ]; then >> - FETCH_DISTRIBUTIONS=3D"$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=3Dyes >> +if [ -n "$BSDINSTALL_USE_DISTRIBUTIONS" ]; then >> + exec 5>&1 >> + export DISTRIBUTIONS=3D$( `dirname $0`/selectdists 2>&1 1>&5 ) >> + exec 5>&- >> fi >>=20 >> rm -f $PATH_FSTAB >> @@ -347,8 +321,10 @@ if [ -n "$FETCH_DISTRIBUTIONS" ]; then >>=20 >> [ $FETCH_RESULT -ne 0 ] && error "Could not fetch remote = distributions" >> fi >> -bsdinstall checksum || error "Distribution checksum failed" >> -bsdinstall distextract || error "Distribution extract failed" >> +if [ -n "$BSDINSTALL_USE_DISTRIBUTIONS" ]; then >> + bsdinstall checksum || error "Distribution checksum failed" >> + bsdinstall distextract || error "Distribution extract failed" >> +fi >>=20 >> # 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 >> new file mode 100644 >> index 000000000000..b548e82a95f8 >> --- /dev/null >> +++ b/usr.sbin/bsdinstall/scripts/selectdists >> @@ -0,0 +1,73 @@ >> +#!/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=3D"/usr/share/bsdconfig" >> +. $BSDCFG_SHARE/common.subr || exit 1 >> + >> +############################################################ = CONFIGURATION >> + >> +# >> +# Default distributions >> +# >> +DISTRIBUTIONS=3D"${DISTRIBUTIONS:-base.txz kernel.txz}" >> + >> +############################################################ MAIN >> + >> +if [ -f $BSDINSTALL_DISTDIR/MANIFEST ]; then >> + DISTMENU=3D`awk -F'\t' '!/^(kernel\.txz|base\.txz)/{print = $1,$5,$6}' $BSDINSTALL_DISTDIR/MANIFEST` >> + DISTMENU=3D"$(echo ${DISTMENU} | sed -E 's/\.txz//g')" >> + >> + if [ -n "$DISTMENU" ]; then >> + EXTRA_DISTS=3D$( 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=3D"$DISTRIBUTIONS $dist.txz" >> + done >> + fi >> +fi >> + >> +FETCH_DISTRIBUTIONS=3D"" >> +for dist in $DISTRIBUTIONS; do >> + if [ ! -f $BSDINSTALL_DISTDIR/$dist ]; then >> + FETCH_DISTRIBUTIONS=3D"$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=3Dyes >> +fi >> + >> +echo $DISTRIBUTIONS >&2 >> diff --git a/usr.sbin/bsdinstall/startbsdinstall = b/usr.sbin/bsdinstall/startbsdinstall >> index 63239c969ac6..8d9fb981c11d 100644 >> --- a/usr.sbin/bsdinstall/startbsdinstall >> +++ b/usr.sbin/bsdinstall/startbsdinstall >> @@ -6,6 +6,7 @@ >> : ${BSDDIALOG_EXTRA=3D3} >> : ${BSDDIALOG_ESC=3D5} >> : ${BSDDIALOG_ERROR=3D255} >> +export BSDINSTALL_USE_DISTRIBUTIONS=3Dy >=20 > I said it in the review and I=E2=80=99ll say it again here since you = decided to > just ignore me: this does not belong here. Please remove it and fix = the > default in selectdists. Firstly, ping on this. I still object to the approach taken here. Secondly, this commit was not at all tested. You do not install the new selectdists script, and so the installer falls over (in a rather cryptic way*). I am extremely unimpressed at ignoring reviewer comments and completely breaking the installer, and thus am immediately reverting this commit. It probably works if you install the script, but it=E2=80=99s your job to test that, not mine, so when you have a patch = that actually works please re-seek review and actually engage with the comments. Jess * The checksums script is fed garbage for DISTRIBUTIONS and gives: Error while extracting /usr/libexec/bsdinstall/auto:: Failed to open '/usr/freebsd-dist//usr/libexec/bsdinstall/auto:' since it=E2=80=99s interpreting the shell error message from auto of: /usr/libexec/bsdinstall/auto: /usr/libexec/bsdinstall/selectdists: = not found as a space-separated list of distributions.=