installworld failure due to cross-device links

From: Stefan Esser <se_at_freebsd.org>
Date: Wed, 02 Jan 2013 13:04:52 +0100
I'd be interested in the general policy on LINKS vs. SYMLINKS
between directories that might end up on different file systems.

There seems to be an assumption that system directories in /usr
(e.g. /usr/bin, /usr/sbin, /usr/libexec) are on the same file
system, but I do not think that this assumption is documented.

I'm using a ZFS only installation of -CURRENT and have separate file
systems for several of the directories in / and /usr, that usually
share a file system (e.g. /bin, /sbin, but also /usr/bin/, /usr/sbin
and /usr/libexec are independent file systems).

An older case is the link from /usr/bin/chgrp to /usr/sbin/chown
(see usr.sbin/chown/Makefile), which is easily fixed by using a
SMYLINK instead of a LINK.

And now there is usr.sbin/bsdinstall/partedit/Makefile, which as of
r244859 creates a link from /usr/libexec/bsdinstall to /usr/sbin/sade.

This breaks with /usr/bin and /usr/sbin on different file systems,
while it should not according to the commit message:

----------------------------------------------------------------------
r244859 | nwhitehorn | 2012-12-30 15:35:00 +0100 (Sun, 30 Dec 2012) | 7
lines

Replace sade the extracted piece of sysinstall with sade the extracted
piece of bsdinstall (although this time with a symlink instead of
duplicated source code).

Discussed on:   freebsd-geom
MFC after:      3 months
----------------------------------------------------------------------

The SYMLINK mentioned in the commit message is a LINK to a different
directory, which might be on a different file system, actually.

This should be fixed by the attached patch, to remove the implied
assumption and to make the Makefile match the commit message.

Regards, STefan

Received on Wed Jan 02 2013 - 11:05:04 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:33 UTC