When FreeBSD is installed without a dedicated /home filesystem, /home is a symlink to /usr/home. I have put crochet in my home directory, and crochet.log reports:
Overlaying board-specific files from /home/chul/crochet/board/RaspberryPi3/overlay
cpio: .: Cannot extract through symlink /home/chul/crochet/work/_.mount.freebsd
cpio: ./boot: Cannot extract through symlink /home/chul/crochet/work/_.mount.freebsd/boot
cpio: ./boot/loader.conf: Cannot extract through symlink /home/chul/crochet/work/_.mount.freebsd/boot/loader.conf
cpio: ./boot/loader.rc: Cannot extract through symlink /home/chul/crochet/work/_.mount.freebsd/boot/loader.rc
cpio: ./etc: Cannot extract through symlink /home/chul/crochet/work/_.mount.freebsd/etc
cpio: ./etc/fstab: Cannot extract through symlink /home/chul/crochet/work/_.mount.freebsd/etc/fstab
cpio: ./etc/rc.conf: Cannot extract through symlink /home/chul/crochet/work/_.mount.freebsd/etc/rc.conf
0 blocks
This will happen whenever the $WORKDIR path contains a symlink. It looks like cpio intentionally refuses to write to a path containing a symlink, for security purposes.
Fix: In crochet.sh, replace
TOPDIR=`cd \`dirname $0\`; pwd`
with
TOPDIR=`cd \`dirname $0\`; realpath .`
Alternatively and untestedly, replace find . | cpio -pmud $X with cp -pr . $X everywhere, or use cpio --insecure, but that is apparently insecure.
When FreeBSD is installed without a dedicated /home filesystem, /home is a symlink to /usr/home. I have put crochet in my home directory, and crochet.log reports:
This will happen whenever the $WORKDIR path contains a symlink. It looks like cpio intentionally refuses to write to a path containing a symlink, for security purposes.
Fix: In crochet.sh, replace
with
Alternatively and untestedly, replace
find . | cpio -pmud $X
withcp -pr . $X
everywhere, or usecpio --insecure
, but that is apparently insecure.