Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Mandatory info for bug reports:
FreeBSD version ( uname -a ): 11.1-RELEASE-p9 FreeBSD 11.1-RELEASE-p9
CBSD version ( cbsd version ): 11.1.18
After upgrading the system from FreeBSD 10.3 to 11.1 I tried to upgrade the jails with “cbsd jupgrade” but I get “cpio: … Cannot extract through symlink …. ” errors
this is an example of a error-line
“/usr/jails/jails-data” is the symlink to "/tank/jails-data"
Never had this before eg when upgrading from 10.0 to 10.1 and to 10.3. I’m not sure if this is a CBSD issue and I hope someone has a solution.
Thank you in advance.
Hmm. I suggest you use at the moment default FreeBSD tools: freebsd-update ( https://www.bsdstore.ru/en/11.1.x/wf_jupgrade_ssi.html#freebsd-upgrade ). I'm not sure I can fix it quickly. And maybe it does not make sense anymore:
because at the moment @mekanix works on a new and more universal script for jail updating ( formally, the new script will use freebsd-update for FreeBSD or hbsd-update for HardenedBSD .. to update files).
Also, I plan to make support in the near future for FreeBSD-in-packages update method. E.g, I update my servers through 'pkg': https://pastebin.com/wRQd1NHr
It seems that this is the best and fastest method of updating FreeBSD bases.
So, most likely, we will no longer develop and maintain the old 'jupgrade' script.
In some cases, the source and target directories can be in the form of symbolic links. In these cases, symbolic links are not handled correctly by cpio with follow notices: cpio: <src>: Cannot extract through symlink <dst> We must make sure that we always go to the actual real directory before cpio from curdir, therefore we process src/dst directory by realpath(1). Issue #287, Reported by: Juronski. Thanks!
^^ it was a very useful remark. We use cpio from current directory. In your case this was not the real path, so I've add realpath(1) in these places. Your situation only occurs when directories use symbolic links. Thanks for reports, fixed via 5a541d8