From nobody Thu May 11 08:40:01 2023 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 4QH52H2fwYz49wsn; Thu, 11 May 2023 08:40:39 +0000 (UTC) (envelope-from garyj@gmx.de) Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mout.gmx.net", Issuer "Telekom Security ServerID OV Class 2 CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QH52F58BMz3hnL; Thu, 11 May 2023 08:40:37 +0000 (UTC) (envelope-from garyj@gmx.de) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1683794425; i=garyj@gmx.de; bh=t9QfCMRM87Fd2wFnQuNvsx5u5JmanoUTO9MJvP/SlT0=; h=X-UI-Sender-Class:Date:From:To:Cc:Subject:In-Reply-To:References: Reply-To; b=XRtTknrlc1k5FTe693emJvL9S6e+ondkOBjr/OFwTTpoyiNDvjuTJ6NBntEVu9kVW OeWsWVw8Oun1QLSeFrc7VCyruLqOXJ24lBjlvyDUDS89M3kasjovQUlkB5InJ89Ghb uVAm6lbJigfeIZ7Imxv7Rlx8iQ/+eNrsVsaHwf5k5GcHW/a//USPW1vfXQSJrv8qBQ hqOWKmfGI7Tj9Vn6En4wKUCzP81FMw7bGUWk9t/ry2WFoIrKAM5Qgnw35m34FosR1J hxo6HaCMGu6CDnUyyI7KCr6PY9BCtxRKxn9SADUpN8SrFqF/iOkpGAdUL/GLRp6MrZ /9ueQCRADQqLQ== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from ernst.home ([91.59.238.143]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1N33ET-1qKIDc11Wn-013NTy; Thu, 11 May 2023 10:40:25 +0200 Date: Thu, 11 May 2023 08:40:01 +0000 From: Gary Jennejohn To: Mike Karels Cc: Cy Schubert , Mitchell Horne , rgrimes@freebsd.org, src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 36db6b04962a - main - hier(7): document /home/ and /usr/home/ Message-ID: <20230511104001.6b925848@ernst.home> In-Reply-To: <4367FD0A-76AC-4E98-A133-E50D8CF841C7@karels.net> References: <202305101419.34AEJf1x054239@gndrsh.dnsmgr.net> <20230510151313.9E7A6111@slippy.cwsent.com> <4367FD0A-76AC-4E98-A133-E50D8CF841C7@karels.net> Reply-To: garyj@gmx.de X-Mailer: Claws Mail 3.19.0 (GTK+ 2.24.33; amd64-portbld-freebsd14.0) 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 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:4mr6dSFQW/LwReTcJCeOey0lFOdqIuO5emX/JFePuxYdRyuiMvO kWywNsIqUUaYbQCppzzXsDsMIL5xyMvOOXCs6aD0a8Mktd/HSMOXPBI+6neg6BdTJloTj7+ 7Zen0K4eIoeTPLfQZsBoXdvJjDvCDJ8riCmBvzz40n+RkDsBnkQxar4Ra9sGco6XgDGabUk sgI7+lrf6IC5RzOZeQPag== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:kG7bTQyvwSc=;HpoPdQuKwUwN3PuKnAHxh3GWOZj tMFG0bBeAK/SMhWUY/KvPBssm2V+N1u8Uw5mGGoxeb6OiE5QLcKcBUpXkj/I/4y3/9qlFOWYG +NavtjYcXWNEykiLZJOm9MG1jII8vJQkemGEnui3MvZRAvUwThlwjjFh2+8KxCJtQzJNTkSO0 e5QmOSG83xyqaEyKqB4hFh3eXMWgsEffyi1A8cH74+SSJ78F3u0pKnT6jSC3UVVkLSUiS7YWy 3b+wH4u+ARjY6oPMJPNJYm+AX0mq8t8gUeFgdL8oN5e5soRD47gXPmQvgkEDaHEBrPoyusDQI 3WeJFsDirtr3IvtDV0V5oln8gKWB0+0j4Jx5kDy7gx1BBRV9ZL1YTc7SWCgxInAJCzlIa0vjD R7kVZbRvwN7i0iZg1R9g4JSs0C3w1n4iubAgqFjZftwlWBmKfZ4c1vahVVtV8m5HENLIYN+zi 0sQqwk2T33Rxhc9O5oARCKdjyo9Ft1c6f3BOqUKhv1zr7hgYt2QNZC6x9Gwerbc4CRtJKdnYR t/z3t9YH26qltkmCo6mH8AZI6DG3dxWv/fAu1H/Ksl02nJ0eT7xknLDUuJo7JM0dOSg9mBm/9 Fm88FjHd3ZJowH9uiA2s8vSrTCNu7gSr0OpWioWfppTyjAH20VkzTzif2aABD9bxDUrI1+oz7 FTXq1NWJgtmD9PNL/f+lLjH/c18NeS8JcdO/IX2GWnKEjeU0kQh3pHbL3jR2xpSdm5y0KKo7Q QcZS/b4sk+1jUbPEFWT99waUOZqYQROKRgWbqYPOhPNIMBQBv4nf3FD+PSXLukzm/rTtbbl16 3hW8UQK/IeniOkgCUU2LF7c8n/93h1Gc3oD6+C3x5m5QPUPMh68GyvU3FTTbvojU/1jOjK9IM R3CiSeKKfbcySKASjYTHJCRdJnMO4WjaFqud0tUmzJTaWC/k2tbFPtyfNBf4BmVgX2XTx1Ivj LkpKF2lHd0Sb1kAinPDWjbdot4A= X-Rspamd-Queue-Id: 4QH52F58BMz3hnL X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:8560, ipnet:212.227.0.0/16, country:DE] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On Wed, 10 May 2023 16:48:12 -0500 Mike Karels wrote: > On 10 May 2023, at 10:13, Cy Schubert wrote: > > > In message , Mitchel= l > > Horne w > > rites: > >> On 5/10/23 11:19, Rodney W. Grimes wrote: > >>>> The branch main has been updated by mhorne: > >>>> > >>>> URL: https://cgit.FreeBSD.org/src/commit/?id=3D36db6b04962a01ff7b21= 592def02d > >> 4c570dac939 > >>>> > >>>> commit 36db6b04962a01ff7b21592def02d4c570dac939 > >>>> Author: Mitchell Horne > >>>> AuthorDate: 2023-05-10 12:53:56 +0000 > >>>> Commit: Mitchell Horne > >>>> CommitDate: 2023-05-10 13:25:17 +0000 > >>>> > >>>> hier(7): document /home/ and /usr/home/ > >>>> > >>>> Reviewed by: imp > >>>> MFC after: 1 week > >>>> Sponsored by: The FreeBSD Foundation > >>>> Differential Revision: https://reviews.freebsd.org/D40002 > >>>> --- > >>>> share/man/man7/hier.7 | 10 ++++++++++ > >>>> 1 file changed, 10 insertions(+) > >>>> > >>>> diff --git a/share/man/man7/hier.7 b/share/man/man7/hier.7 > >>>> index ff11289436a1..b6759dd6e65b 100644 > >>>> --- a/share/man/man7/hier.7 > >>>> +++ b/share/man/man7/hier.7 > >>>> @@ -90,6 +90,10 @@ file descriptor files; > >>>> see > >>>> .Xr \&fd 4 > >>>> .El > >>>> +.It Pa /home/ > >>>> +user HOME directories. > >>>> +This is a symlink to > >>>> +.Pa /usr/home/ > >>> > >>> /usr is "contains the majority of user utilities and applications" > >>> it should not contain home directories. > >>>> I do not know when this move to usr came about it was traditionally > >> /home. > >>> I do not know why /usr/home even exists, it is not needed by > >>> anything I am aware of. If we have a compatible link it > >>> should be, usr/home -> ../home and /home should be the > >>> directory. > >>> > >> > >> I agree that /usr/home is strange, and is unique (?) to FreeBSD. > >> > >> The oldest commit in the output of `git log --grep '/usr/home'` is: > >> > >> commit f2400d465896a8e4f6fdc57eba840cf49b25bbbd > >> Author: David Nugent > >> Date: Fri Jan 3 04:42:18 1997 +0000 > >> > >> Implemented /home -> /usr/home symlink kludge. > >> If home basedir would be created in the root partition, create > >> it under /usr instead, and symlink /basedir -> /usr/basedir. > >> > >> Notes: > >> svn path=3D/head/; revision=3D21242 > >> > >> > >> So it has been this way for 26 years at least. I do not know what to = say > >> about whether /usr "should" contain it, but it does. > > > > Usually history matters. I can understand not changing it. On the flip > > side, I cut my UNIX teeth on SunOS 4 and Solaris where /home was /home= -- > > albeit automounted from /export/home on localhost or some NFS server. = In > > the Red Hat land at $JOB, /home is its own partition (actually an LVM > > volume). In both cases /home is not in /usr because end-users can fill > > /usr. This can be problematic operationally because it's yet another > > headache to deal with should someone fill the filesystem. Filling /usr= is > > more serious than filling /home. > > > > As a point of interest, when I installed my first FreeBSD many moons a= go I > > used the Solaris standard of /export/home, using amd (now automount) t= o > > serve my /home. I'm not advocating we do this, it's overkill, but /hom= e > > should not live in /usr. It's a potential headache for any sysadmin. > > > > With ZFS the solution is easy. With UFS based systems there are a lot = of > > other factors that go into how we install the "default" from the get-g= o. > > The situation is a fair mess. It took me a little while to figure out t= hat > the kludge referenced above is in the pw(8) command, which is used as th= e > backend to adduser(8). Neither /home nor /usr/home is in the base packa= ge. > adduser defaults to /home/user, and creates the parent directory (e.g. /= home) > if it does not exist, but if there is no internal slash, pw moves the pa= rent > to /usr. In this case, it makes the symlink from root. zfs is differe= nt, > in that it includes a usr/home dataset already (created by bsdinstall). > In this case, creating a user with /home/user causes the symlink to be a= dded > as a side effect. > > I?m sure the kludge was originally done when root and /usr were separate > file systems by default, root was small, and there was no /home by defau= lt. > However, we now default to a single large file system (with datasets, in > the zfs case). > > All of this really is a horrible kludge, and it is a house of cards. I'= m > amazed that it doesn't break more often. I'm tempted to remove the klud= ge > and change the zfs setup to create a home dataset rather than usr/home. > However, if zfs users explicitly configure a home directory under /usr/h= ome, > this would end up in the usr dataset. An alternative would be to remove= the > code from pw to create the parent directory entirely (which seems sensib= le), > and create a /home directory for ufs installs. I don't know how well kn= own > it is that adduser/pw will create parent directories for home directorie= s > though. This cleanup would change the default location for home directo= ries > to /home, which makes more sense. It would require documentation, e.g. = in > the release notes. The changes would only affect new installations, not > upgrades. > > Thoughts? > Adding home would require a change to BSD.root.dist, since it's not currently in there. Only usr is present. IMHO changing pw would be a reasonable approach. =2D- Gary Jennejohn