Installworld fails when /usr/bin and /usr/sbin are different FS / how to use symlinks in installworld?
Alexander Leidinger
Alexander at leidinger.net
Sat Sep 3 14:28:08 UTC 2016
Quoting Alexander Leidinger <Alexander at leidinger.net> (from Sat, 03
Sep 2016 08:24:49 +0200):
> Quoting Bryan Drewery <bdrewery at freebsd.org> (from Fri, 2 Sep 2016
> 15:51:56 -0700):
>
>>> The error message is obvious, it tries to create a hardlink which is off
>>> course not possible when src and dest of the link are on different FS.
>>>
>>> My goal of an easy procedure (installworld into target datasets) doesn't
>>> work like this off course. Do we have an easy way of telling
>>> installworld to create symlinks instead of hardlinks, or alternatively a
>>> way to tell to copy instead of doing a hardlink if the install hits the
>>> cross-device case?
>>
>> Maybe falling back to symlink could be done.
>
> A copy-in-cross-fs-case would be the best solution, this way you
> don't need to care about having the right path (DESTDIR comes into
> the game here) specified on the comman line.
I just checked, this 9.6k file the only case were a hardlink would be
done outside the dataset. Changing LINKS to SYMLINKS for chown would
be the most easy solution. This would work in the usual use cases (and
surely in the normal FreeBSD use), but it would fail in the edge case
were someone is using relative-path based execution of chgrp in a
shifted-away location without using chroot and expecting it will use
chown from the shifted-away location.
Is this an use-case which we care about, or should we just change
LINKS to SYMLINKS?
Without the need to support DESTDIR, the install-argument "-l m"
(hardlink if same FS, symlink if cross-FS) would have been a less
intrusive option for this. Unfortunately there is no linkoption "c"
for copy-if-cross-FS (and I rather modify the Makefile locally than to
spend time to implement such an option for just this one case).
Bye,
Alexander.
--
http://www.Leidinger.net Alexander at Leidinger.net: PGP 0x8F31830F9F2772BF
http://www.FreeBSD.org netchild at FreeBSD.org : PGP 0x8F31830F9F2772BF
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: Digitale PGP-Signatur
URL: <http://lists.freebsd.org/pipermail/freebsd-current/attachments/20160903/86a0a58f/attachment.sig>
More information about the freebsd-current
mailing list