cpio regression (Re: Root partition and usrland on one slice, /usr/local ports and srcon another)

Eugene Grosbein eugen at grosbein.net
Fri Jun 15 17:19:38 UTC 2018


15.06.2018 23:14, Jamie Landeg-Jones wrote:

>> I still don't get what specific problems did you have
>> but I'm sure they were not due to symlinking as such links work just fine
>> for me with gcc, and with clang too.
> 
> Cy Schubert <Cy.Schubert at komquats.com> replied:
> 
>> Neither do I. I've been using a combination of symlinks, ufs, nullfs, zfs legacy and straight zfs in various configurations over the years on various systems with no problems whatsoever.
> 
> I just came across one with multimedia/ffmpeg4:
> 
> Debugging the install stage gives this, though the cpio error messages are sent to null by default:
> 
> | + /usr/bin/find -Ed Changelog CREDITS INSTALL.md LICENSE.md MAINTAINERS README.md RELEASE_NOTES
> | + /usr/bin/cpio -dumpl /scratch/root/ports_base/usr/ports/multimedia/ffmpeg/work/stage/usr/local/share/doc/ffmpeg
> | cpio: Cannot extract through symlink /scratch/root/ports_base/usr/ports/multimedia/ffmpeg/work/stage/usr/local/share/doc/ffmpeg/Changelog

Well, I known this. Some time ago our cpio got "broken" in a way:
it now demands "--insecure" option to work with symlinks same way it worked long before without this option.

While I may understand motivation, this change still broke previously working scripts
like /usr/src/tools/tools/nanobsd/nanobsd.sh (generates NanoBSD images)
using cpio without "--insecure" when some parts of the building system are symlinked to other locations.



More information about the freebsd-hackers mailing list