Re: git: 36db6b04962a - main - hier(7): document /home/ and /usr/home/

From: Mitchell Horne <mhorne_at_freebsd.org>
Date: Wed, 10 May 2023 14:53:45 UTC
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=36db6b04962a01ff7b21592def02d4c570dac939
>>
>> commit 36db6b04962a01ff7b21592def02d4c570dac939
>> Author:     Mitchell Horne <mhorne@FreeBSD.org>
>> AuthorDate: 2023-05-10 12:53:56 +0000
>> Commit:     Mitchell Horne <mhorne@FreeBSD.org>
>> 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 <davidn@FreeBSD.org>
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=/head/; revision=21242


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.

Cheers,
Mitchell

>>   .It Pa /etc/
>>   system configuration files and scripts
>>   .Pp
>> @@ -214,6 +218,12 @@ and
>>   .Xr bsdinstall 8
>>   .It Pa include/
>>   standard C include files
>> +.It Pa home/
>> +users' HOME directories;
>> +the layout is not standardized, but a typical interactive user
>> +.Dv beastie
>> +might receive their own directory under
>> +.Pa /usr/home/beastie
>>   .Pp
>>   .It Pa lib/
>>   shared and archive
>>
>