From owner-dev-commits-src-all@freebsd.org Wed Mar 3 15:55:18 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2C77256E7FD; Wed, 3 Mar 2021 15:55:18 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (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 "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DrJVZ0p1kz4Rqx; Wed, 3 Mar 2021 15:55:18 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from comporellon.tachypleus.net (unknown [IPv6:2601:405:4a00:acd:cc7b:682b:f804:9afd]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: nwhitehorn/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id BA41522D98; Wed, 3 Mar 2021 15:55:17 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) To: Warner Losh Cc: Brandon Bergren , "Rodney W. Grimes" , Ed Maste , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202103031253.123CrxKG051357@gndrsh.dnsmgr.net> <14d09680-1036-4a7e-8a0e-c3063cac8bc9@www.fastmail.com> From: Nathan Whitehorn Subject: Re: git: 2c26d77d989a - main - Remove /boot/efi from mtree, missed in 0b7472b3d8d2. Message-ID: <6e52fee6-a2fd-584f-757e-e77a8f8ea8eb@freebsd.org> Date: Wed, 3 Mar 2021 10:55:17 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Content-Language: en-US X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2021 15:55:18 -0000 On 3/3/21 10:38 AM, Warner Losh wrote: > > > On Wed, Mar 3, 2021 at 7:13 AM Nathan Whitehorn=20 > > wrote: > > > > On 3/3/21 9:05 AM, Brandon Bergren wrote: > > On Wed, Mar 3, 2021, at 6:53 AM, Rodney W. Grimes wrote: > >> What am I missing here?=C2=A0 One place I am being told this is = run in > >> an environment that may not even be an EFI booted system, and in= > >> another place it is being used as a test if something is mounted= > >> on it, which should only be true on an EFI booted system. > > That the script in question is a generic script that runs as > part of bsdinstall on every platform and has to be universal. > > > > The actual *problem* here is that > usr.sbin/bsdinstall/scripts/bootconfig has a default case that is > >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 *)=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 die "Unsupported arch $(uname -m) for > UEFI install" > > > > which then causes the main script to bail out, leaving the > system in a half-installed state. > > > > If that had just been an exit 0 this would have never been a > problem, I suppose. > > > > Before the original change that broke this, there was a check > that the script was not running on powerpc or mips platforms > before running the efi bits, but this got taken out. > > > > Well, incidentally. The bootconfig script needs to know if there > is an > ESP it should configure, but the signalling mechanism (the > presence of > the ESP mount point) was being broken by mtree making that director= y > unconditionally even on systems that don't use EFI. So then > bootconfig > tried to set it up, but failed later on, because there was no EFI > loader > to set up. The mtree change makes the ESP mount point only exist on= > systems with an ESP. > > > So you made a unilateral change, without discussion of the bigger=20 > design, to something without even asking the original person who made=20 > the change to mtree about it for what sounds like an obscure case in=20 > the installer that could be solved in a different way? It's trivial=20 > enough to look at the boot method sysctl and skip the EFI update if we = > didn't boot EFI (and if by change that's not on all systems, it's easy = > enough to add it on all systems). I have no notion about why that=20 > wasn't considered, at least, before jumping in and taking people by=20 > surprise. > > Next time, talk to people first. That's the whole point of having=20 > review tools, mailing list and git blame. > > Warner This method of testing was in the original review here posted on Feb.=20 23: https://reviews.freebsd.org/D28897 The description of the test procedure you're objecting to was even in=20 the summary! Then we had a discussion by email about the change to mtree = on the committers list on Feb. 28 to resolve a bug affecting PowerPC in=20 the patch reviewed and approved by you. I then waited several days and=20 had a long thread for several days on the mailing list about the=20 approach. coming up with this short patch -- again, as a bug fix to a=20 reviewed approach. We can change the logic -- that's fine! But, to paraphrase, the reason=20 we have reviews is so people like you can look at the review and note=20 these kinds of problems when they are reviewed, not after the commit=20 goes in. There's a significant amount of whiplash when you do get=20 patches reviewed, approved, and then the person who reviewed and=20 approved them accuses you of "taking people by surprise". The installer *does* mount the partition in advance, so checking whether = there is a mounted file system is a perfectly reasonable test to do. We=20 could also check fstab. I would like to understand what is actually=20 wrong here first, though. Especially after this misfire -- which is=20 problematic for reasons that are still not clear to me, since there are=20 a number of standard directories in hier(7) not in mtree -- I want to=20 make sure we actually do have consensus about what is changing and why. -Nathan