[Bug 213255] ports-mgmt/pkg: hardlinks aren't installed by make install (fake-pkg)

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Sun Nov 6 19:31:53 UTC 2016


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=213255

--- Comment #1 from Tijl Coosemans <tijl at FreeBSD.org> ---
Created attachment 176698
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=176698&action=edit
patch

So this turned out to be caused by /compat being a symlink to usr/compat on my
system and it's a bug in libarchive.  It can be reproduced with tar like this:

% mkdir dir2
% ln -s dir2 dir
% touch dir/file
% ln dir/file dir/file2
% tar cf dir.tar dir/file dir/file2
% rm dir/*
% tar xf dir.tar -P
dir/file2: Can't create 'dir/file2'
tar: Error exit delayed from previous errors.
tijl at kalimero:~/tmp/test% ls -l dir/
total 0
-rw-r--r--  1 tijl  wheel  0  6 Nov 20:05 file

With -P extraction through a symlink (dir->dir2) should work, but fails for
hardlinks.

The attached patch fixes this.  In archive_write_disk_posix.c the function
create_filesystem_object() calls check_symlinks_fsobj() in the case of
hardlinks, but not in the case of symlinks or regular files.  The patch removes
this call.  check_symlinks_fsobj() is still called elsewhere in the same file
and the 'tar xf' command above without -P still fails on both archive entries.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-pkg mailing list