From owner-dev-commits-src-all@freebsd.org Thu Mar 4 15:02:43 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 3C9B554DCC7; Thu, 4 Mar 2021 15:02:43 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mx.blih.net (mx.blih.net [212.83.155.74]) (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 (2048 bits) client-digest SHA256) (Client CN "mx.blih.net", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DrvHQ3KmZz3v3C; Thu, 4 Mar 2021 15:02:42 +0000 (UTC) (envelope-from manu@bidouilliste.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bidouilliste.com; s=mx; t=1614870160; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=OyN3uMdcH4fbGG7IPk/Vt3Y50tpTcG79lvTU3xGJdpw=; b=n7lLD1/zWRAmUbHl2KBNU9TkD+mQHMnYwu8xLj8sY8no6rbqB4fcfZKbtAohZwsbAm80tu cVh4mtJQevDNWfd8n6k+lRR91Rw+8wdgmyxQcupt+O/mjaqJIaJigE6b01garCryL1B/pw MeG4qfVdx4Y38lTWCyu3IAFTpcJB8GU= Received: from amy (lfbn-idf2-1-644-4.w86-247.abo.wanadoo.fr [86.247.100.4]) by mx.blih.net (OpenSMTPD) with ESMTPSA id d14b9341 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Thu, 4 Mar 2021 15:02:40 +0000 (UTC) Date: Thu, 4 Mar 2021 16:02:40 +0100 From: Emmanuel Vadot To: rgrimes@freebsd.org Cc: "Rodney W. Grimes" , Nathan Whitehorn , Warner Losh , Brandon Bergren , Ed Maste , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 2c26d77d989a - main - Remove /boot/efi from mtree, missed in 0b7472b3d8d2. Message-Id: <20210304160240.494a85605396c0751d7313da@bidouilliste.com> In-Reply-To: <202103041456.124EuB88056045@gndrsh.dnsmgr.net> References: <6e52fee6-a2fd-584f-757e-e77a8f8ea8eb@freebsd.org> <202103041456.124EuB88056045@gndrsh.dnsmgr.net> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; amd64-portbld-freebsd14.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4DrvHQ3KmZz3v3C X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] 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: Thu, 04 Mar 2021 15:02:43 -0000 On Thu, 4 Mar 2021 06:56:11 -0800 (PST) "Rodney W. Grimes" wrote: > > On 3/3/21 10:38 AM, Warner Losh wrote: > > > > > > > > > On Wed, Mar 3, 2021 at 7:13 AM Nathan Whitehorn > > > > 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?? 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 > > > >? ? ? ? ? ? ? *)? ? ? ? ? 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 directory > > > 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 > > > design, to something without even asking the original person who made > > > the change to mtree about it for what sounds like an obscure case in > > > the installer that could be solved in a different way? It's trivial > > > 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 > > > wasn't considered, at least, before jumping in and taking people by > > > surprise. > > I still do not understand why machdep.bootmethod=EFI was rejected? > Is this value not present on ALL platforms that boot in EFI mode? > if exist(machdep.bootmethod) && machdep.bootmethod=EFI seems to > me to be the best and valid way to make this decision. If that > has issues working on a platform we need to fix that issue and not > do all this other stuff. We need to install and create the efi dir even if the installer is booted in CSM mode, so a user can switch to full uefi mode after and still can boot the FreeBSD that was installed. (The same thing must be done for bios boot code). > > > > > > Next time, talk to people first. That's the whole point of having > > > review tools, mailing list and git blame. > > > > > > Warner > > > > This method of testing was in the original review here posted on Feb. > > 23: https://reviews.freebsd.org/D28897 > > > > The description of the test procedure you're objecting to was even in > > 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 > > the patch reviewed and approved by you. I then waited several days and > > had a long thread for several days on the mailing list about the > > approach. coming up with this short patch -- again, as a bug fix to a > > reviewed approach. > > > > We can change the logic -- that's fine! But, to paraphrase, the reason > > we have reviews is so people like you can look at the review and note > > these kinds of problems when they are reviewed, not after the commit > > goes in. There's a significant amount of whiplash when you do get > > patches reviewed, approved, and then the person who reviewed and > > 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 > > could also check fstab. I would like to understand what is actually > > wrong here first, though. Especially after this misfire -- which is > > problematic for reasons that are still not clear to me, since there are > > a number of standard directories in hier(7) not in mtree -- I want to > > make sure we actually do have consensus about what is changing and why. > > These *should* be fixed. ALL directories that are part of a finished > FreeBSD system should be present both in hier.7 and in the mtree files, > deviating from that should only be allowed if there is some really > really grand reasons. If the reason is "architecture foo does not > have directory /bar/zap" one could and should create an arch specific > mtree file that covers these, having these mkdir's (prefer to see > all those changed to install -d's) scattered around all over, IMHO > creates maintance and inconsistency issues. > > > -Nathan > -- > Rod Grimes rgrimes@freebsd.org -- Emmanuel Vadot