Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 11 Apr 2020 17:19:53 +0000
From:      Grzegorz Junka <list1@gjunka.com>
To:        "Rodney W. Grimes" <freebsd-rwg@gndrsh.dnsmgr.net>, Emmanuel Vadot <manu@bidouilliste.com>
Cc:        freebsd-pkgbase@freebsd.org
Subject:   Re: /root on a separate dataset breaks FreeBSD-base installation
Message-ID:  <ee68e0a4-94c0-765c-a69f-57bdf5a7c93f@gjunka.com>
In-Reply-To: <202004111703.03BH3Xmu023720@gndrsh.dnsmgr.net>
References:  <202004111703.03BH3Xmu023720@gndrsh.dnsmgr.net>

next in thread | previous in thread | raw e-mail | index | archive | help

On 11/04/2020 17:03, Rodney W. Grimes wrote:
>> On Sat, 11 Apr 2020 09:42:49 -0700 (PDT)
>> "Rodney W. Grimes" <freebsd-rwg@gndrsh.dnsmgr.net> wrote:
>>
>>> [ Charset UTF-8 unsupported, converting... ]
>>>> I am following https://wiki.freebsd.org/PkgBase
>>>>
>>>> This:
>>>>
>>>> pkg install -g 'FreeBSD-*'
>>>>
>>>> fails with this:
>>>>
>>>> [2/800] Extracting FreeBSD-runtime-12.1_3:?? 4%
>>>> pkg: Fail to create hardlink:
>>>> /root/.pkgtemp..cshrc.v5sxGCRu3GlP:Cross-device link
>>>                   ^^^^^^
>>>
>>>
>>>> [2/800] Extracting FreeBSD-runtime-12.1_3: 100%
>>>>
>>>> /root is in a different ZFS dataset. It works fine if it's not. Why pkg
>>>> is using /root/.pkgtemp instead of /tmp or /var/tmp? It doesn't matter
>>>> from where I run the command, looks like the path is hardcoded.
>>> The failure is caused by the fact that /.cshrc and /root/.cshrc
>>> are hardlinked to each other.  A hardlink can not cross a
>>> ZFS dataset or a ufs mount point.
>>   Ah right.
>>
>>>> Can I workaround with some option to pkg?
>>> I doubt that.
>>   Someone (tm) should add support for this in pkg.
> An option to convert hardlinks to symlinks or duplicate files could be done.
>
> For the person with this problem there are ways to work around it
> by not making /root a seperate dataset, create /toor data set,
> set toor login home to /toor, use that for what ever it is that
> made you feel you needed to have /root as its own data set.


Did you mean - set root login home to /toor? Or create a new toor user?

I think the same will be with .profile which also looks like it's 
hardlinked.

Wouldn't pkg already have to handle this for normal port packages 
somehow? Or they never create hardlinks? Is it worth raising bug/feature 
in bugzilla for pkg?

--GrzegorzJ





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ee68e0a4-94c0-765c-a69f-57bdf5a7c93f>