FreeBSD user home directory
Mark Millard
markmi at dsl-only.net
Thu Jul 21 07:55:43 UTC 2016
On 2016-Jul-20, at 11:59 PM, Mark Millard <markmi at dsl-only.net> wrote:
> On 2016-Jul-20, at 8:03 PM, Glen Barber <gjb at FreeBSD.org> wrote:
>
>> On Wed, Jul 20, 2016 at 07:54:27PM -0700, Mark Millard wrote:
>>> Looking at my armv6 and amd64 11.0's (long in use, originally
>>> -CURRENT, now -STABLE, maintained via source updates):
>>>
>>> amd64 and armv6 (rpi2) both have real /usr/home directories.
>>>
>>> armv6 (and rpi2) has no /home path established at all, not even
>>> as a symbolic link to elsewhere.
>>>
>>> amd64 has /home -> usr/home via a symbolic link.
>>>
>>> (I do not have access to check my memory and will not for weeks
>>> but if I remember right my powerpc64 and powerpc 11.0's were like
>>> amd64 above. They dated back to somewhat before 2016-June-04 when
>>> last updated.)
>>>
>>> If I remember right my old powerpc and powerpc 10.x-STABLE's and
>>> 10.x-RELEASES also agreed with amd64 above. (At the time I only was
>>> experimenting with powerpc64 and powerpc FreeBSD.)
>>>
>>> In comparison today's -r303119 says:
>>>
>>>> Log:
>>>> Create a /usr/home -> /home symlink for the arm images to
>>>> avoid /usr/home confusingly being created as a directory.
>>>
>>>
>>> May be which path is to directly be the actual directory by default
>>> has changed --since all of my contexts started long ago.
>>>
>>> But what all my confirmable examples suggest is that /usr/home
>>> is normally the directory.
>>>
>>> I did not manually control or create /usr/home for any of the
>>> contexts as far as I can remember. It was automatic as a side effect
>>> of some activity.
>>>
>>
>> Right, but as we do not provide binary upgrade paths for tier-2
>> architectures, nothing should be affected for source-based upgrades.
>> Especially in this case.
>>
>>> If there is variability up to now or across architectures it might
>>> be appropriate to have an UPDATING entry to indicate the new uniform
>>> answer or whatever describes how things now are.
>>>
>>> Are there alternative standard FreeBSD installation techniques
>>> that may be should all be made to match for such properties? (POLA
>>> for such defaults: lack of variability across [the major or official]
>>> techniques?)
>>>
>>
>> This is discussion that is not applicable for the commit to which you
>> reference. It creates a symlink on an image that is "installed" by
>> writing a raw filesystem onto an SD card via dd(1). This does not
>> affect source-based upgrades.
>>
>> Glen
>
> Just an FYI:
>
> I think I found were my amd64 /usr/home came from: I happened to have
> experimented with zfs for that and /usr/libexec/bsdinstall/zfsboot uses
> the following in defining ZFSBOOT_DATASETS
>
> # Home directories separated so they are common to all BEs
> /usr/home # NB: /home is a symlink to /usr/home
>
> (BE in "BEs" is "Boot Environment".) My only amd64 environment is the
> only context that I've experimented with zfs in.
>
> It is true that this is not likely to have much in common with how my
> armv6, powerpc64, and powerpc environments got to be /usr/home style
> (all tier 2).
Another FYI: I think I've tracked down where my armv6 /usr/home came from:
I happened to experiment with crochet for my very first armv6 creation and
I've never had to start from scratch again for armv6 after that.
# grep -i home ~/crochet/option/User/setup.sh
HOME_DIR=/usr/home
mkdir -p ${BOARD_FREEBSD_MOUNTPOINT}${HOME_DIR}/$1
$PW -V ${BOARD_FREEBSD_MOUNTPOINT}/etc/ useradd -n $1 -s /bin/csh -g wheel -w yes -d ${HOME_DIR}/$1
$CHOWN $UGID ${BOARD_FREEBSD_MOUNTPOINT}${HOME_DIR}/$1
So crochet uses /usr/home as the directly existing directory (or did at
that time anyway).
(I'm not saying that crochet is a standard technique. I had forgotten that
I had happened to decide to experiment with it just the one time when I
first created a armv6 context.)
More information about the freebsd-arm
mailing list