Merge pull request #6084 from StefanScherer/set-tar-header-format-gnu

Set tar header format to tar.FormatGNU
This commit is contained in:
Matthew Hooker 2018-03-29 13:53:28 -07:00 committed by GitHub
commit 71dcc0f212
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -126,6 +126,11 @@ func DirToBox(dst, dir string, ui packer.Ui, level int) error {
return err
}
// We have to set the Format explicitly because of a bug in
// libarchive. This affects eg. the tar in macOS listing huge
// files with zero byte length.
header.Format = tar.FormatGNU
// We have to set the Name explicitly because it is supposed to
// be a relative path to the root. Otherwise, the tar ends up
// being a bunch of files in the root, even if they're actually