Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 03 Sep 2016 16:27:42 +0200
From:      Alexander Leidinger <Alexander@leidinger.net>
To:        freebsd-current@freebsd.org
Subject:   Re: Installworld fails when /usr/bin and /usr/sbin are different FS / how to use symlinks in installworld?
Message-ID:  <20160903162742.Horde.VwF6k4PYaYlU4pH3PhEDVcg@webmail.leidinger.net>
In-Reply-To: <20160903082449.Horde.pMMQ0U5-fysxWXmmSbXbHZa@webmail.leidinger.net>
References:  <20160903002535.Horde.n5qG88hbIXXvxY8xCMGjSbZ@webmail.leidinger.net> <e639125b-7fd7-6787-d25d-1ed6c3d9b583@FreeBSD.org> <20160903082449.Horde.pMMQ0U5-fysxWXmmSbXbHZa@webmail.leidinger.net>

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

[-- Attachment #1 --]
Quoting Alexander Leidinger <Alexander@leidinger.net> (from Sat, 03  
Sep 2016 08:24:49 +0200):

> Quoting Bryan Drewery <bdrewery@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@Leidinger.net: PGP 0x8F31830F9F2772BF
http://www.FreeBSD.org    netchild@FreeBSD.org  : PGP 0x8F31830F9F2772BF

[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAABAgAGBQJXyt3eAAoJEKrxQhqFIICEcFAP/RI3xFth5DdS5Gm7C9rT3kqf
1lbyAqxZRX1ScBUjzKEEZ9OOcCV7gIrEZ4GwthSbMfg8Y6ZFW0kCs/okyJmodBe8
iPCY/r3m0GDICqm+xwYmD6ZfOGkqSsGM5sJB4CEoqXpwTFJFksk4NTp2icll2G7Q
dBS7ScwdEbzdp+LRdRSDP1doakIsGbCk83Pz8sxDc6+6uMgQQa0iWwBSXgwW0TSB
sycW7dE1QGND9AfNcqR7x4eY2I/k9DbKqtRsJynXxn+qwLhQTO/O5GwMhrKh12Wo
t3oe4xs4aDEKr3nb5/A8elLsQOgCRqQHSUTzNj8DSHsFhtagPj5ZIgBqzZ8dMLJm
55dFGPo+r5uc6BKAoKuunKXwLoaX1Pd9IDM/KeRN/USUpEdCu046HSS1WvE92lMv
5rLAmzaJ0P+sEtrvx8CtWXzE30e1tPJY9jPEWYaZXwQuPiS3jh1qzn8W1mc2cvGl
n9mU9I5K8Kf//UZyuyDE4N6S+EJRZwbNKI82/AZD07dFUYCrI7hSbX6CtmEwXwv/
iCBDkd4cJIUf1cTgnxfdCmvaoijAaVDWcW+N8jI5JtnfqCNIQQ2Y1wzLxSxbN9B2
8+28HU5bPyVGi19OBxtuPAInIrRtG8CmoIMuBtJf/Ss1mrpBWtRzZ5aBph7xAbXd
bC6SNB38vlmIUWdKSzhv
=b/Sx
-----END PGP SIGNATURE-----

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20160903162742.Horde.VwF6k4PYaYlU4pH3PhEDVcg>