From owner-dev-commits-src-all@freebsd.org Sun Jan 17 14:48:10 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 6316C4EBB53; Sun, 17 Jan 2021 14:48:10 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DJd7s5xlcz3HW3; Sun, 17 Jan 2021 14:48:09 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.229.168]) by shaw.ca with ESMTPA id 19LZlgvZtbYg319LblIoiw; Sun, 17 Jan 2021 07:48:07 -0700 X-Authority-Analysis: v=2.4 cv=Q4RsX66a c=1 sm=1 tr=0 ts=60044e27 a=7AlCcx2GqMg+lh9P3BclKA==:117 a=7AlCcx2GqMg+lh9P3BclKA==:17 a=xqWC_Br6kY4A:10 a=kj9zAlcOel0A:10 a=EmqxpYm9HcoA:10 a=iKhvJSA4AAAA:8 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=EkcXrb_YAAAA:8 a=WG0phvZHu88vMCuU940A:9 a=CjuIK1q_8ugA:10 a=odh9cflL3HIXMm4fY7Wr:22 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=LK5xJRSDVpKd5WXXoEvA:22 a=pHzHmUro8NiASowvMSCR:22 a=n87TN5wuljxrRezIQYnT:22 Received: from slippy.cwsent.com (slippy [IPv6:fc00:1:1:1::5b]) by spqr.komquats.com (Postfix) with ESMTPS id C1D60C5F; Sun, 17 Jan 2021 06:48:04 -0800 (PST) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.16.1/8.16.1) with ESMTP id 10HEm4Af008925; Sun, 17 Jan 2021 06:48:04 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <202101171448.10HEm4Af008925@slippy.cwsent.com> X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: rgrimes@freebsd.org cc: Stefan Esser , Gleb Smirnoff , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 7e4eca7136ea - main - Revert 97ec6eba653a07. There shouldn't be a dependency of 'tmp' on remote filesystems. Discussed this with Brooks and he can't find evidence that provoked the change in 2005. If anything gets broken I will fix it in a dif In-reply-to: <202101171403.10HE32Vc058085@gndrsh.dnsmgr.net> References: <202101171403.10HE32Vc058085@gndrsh.dnsmgr.net> Comments: In-reply-to "Rodney W. Grimes" message dated "Sun, 17 Jan 2021 06:03:02 -0800." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 17 Jan 2021 06:48:04 -0800 X-CMAE-Envelope: MS4xfIxTGiYKw+K88lVNhcEV0RAX0/BFYit/QduhDC8WlexNaaR4T5VJbRo8nD4EEBS1DLxz5DFhyc/mmg5WjTkFGhSAwdtXAP7qbYIabwUKODDqF0t2p9Ub NeHTFVbwHUXVtsvb6mCAHLXXZHHUopJ4Y1v9tfxqbVmPZk5vzRRqNZVU84dt9PsOYnsfgOSvC0VJ/h/hjDWihLG4qb0Wwnq8A7KXmfuovGNBxCuu1dQPgiXm BQZREnLlsiEAu35jCvH9423aJgVkDxiLg3Y+ii2m/+ixGoQpfp/SDIU+dl9IpDbEKCpiznZo/qZziXnN3zLBRe1TIXVTwCfUNCYX0kfmoKlCn1zABp0zCFW3 NiDYhtmiU2jEbnPFRC9nRXysVqlzEM0dXKnm/ItfZxvJKK5jnds= X-Rspamd-Queue-Id: 4DJd7s5xlcz3HW3 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: Sun, 17 Jan 2021 14:48:10 -0000 In message <202101171403.10HE32Vc058085@gndrsh.dnsmgr.net>, "Rodney W. Grimes" writes: > -- Start of PGP signed section. > [ Charset windows-1252 ignored, treated as US-ASCII ] > > > Am 17.01.21 um 04:18 schrieb Rodney W. Grimes: > > >> The branch main has been updated by glebius: > > >> > > >> URL: https://cgit.FreeBSD.org/src/commit/?id=7e4eca7136eaa35e15f67682468 > f09aa7127b543 > > >> > > >> commit 7e4eca7136eaa35e15f67682468f09aa7127b543 > > >> Author: Gleb Smirnoff > > >> AuthorDate: 2021-01-11 20:13:41 +0000 > > >> Commit: Gleb Smirnoff > > >> CommitDate: 2021-01-15 20:44:06 +0000 > > >> > > >> Revert 97ec6eba653a07. There shouldn't be a dependency of 'tmp' on > > >> remote filesystems. Discussed this with Brooks and he can't find > > >> evidence that provoked the change in 2005. If anything gets broken > > >> I will fix it in a different way, not via rc sequence change. > > > > > > This is because /etc/rc.d/tmp has this line: > > > if ! /bin/df /tmp | grep -q "^/dev/md[0-9].* /tmp"; then > > > > > > and when your doing NFS boots with seperate /usr you do not have > > > /usr/bin/grep to run that line. > > > > > > Almost always the reason things have a REQUIRE: mountcritremote > > > is that they use some commands from /usr. > > Critical statement, :"some commands": you fixed 1 of them, > I also so a bit later: > if _tmpdir=$(mktemp -d -q /tmp/.diskless.XXXXXX); then > > mktemp lives in /usr/bin also > > > This dependency on /usr/bin/grep is easily removed, see: > > > > https://reviews.freebsd.org/D28209 > > > > I like this fix, less dependance on /usr during boot > processing is good. I left a comment in the review. I'll leave it below too. Like Rod, I agree this is a good fix. > > > diff --git a/libexec/rc/rc.d/tmp b/libexec/rc/rc.d/tmp > > index a61321e058ee..2a7205e92b59 100755 > > --- a/libexec/rc/rc.d/tmp > > +++ b/libexec/rc/rc.d/tmp > > @@ -40,10 +40,16 @@ load_rc_config $name > > > > mount_tmpmfs() > > { > > - if ! /bin/df /tmp | grep -q "^/dev/md[0-9].* /tmp"; then > > - mount_md ${tmpsize} /tmp "${tmpmfs_flags}" > > - chmod 01777 /tmp > > - fi > > + while read line; do > > + case $line in > > + /dev/md[0-9]*\ /tmp) > > + return;; > > + esac > > + done <<*EOF > > +$(df /tmp) > > +*EOF df /tmp | while read line ... looks cleaner. Otherwise I agree this is a better approach. > > + mount_md ${tmpsize} /tmp "${tmpmfs_flags}" > > + chmod 01777 /tmp > > } > > > > # If we do not have a writable /tmp, create a memory > > > -- End of PGP section, PGP failed! > > -- > Rod Grimes rgrimes@freebsd.or > g > -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org The need of the many outweighs the greed of the few.