From 832f390733348766340603630c46821d1c0e8a4a Mon Sep 17 00:00:00 2001 From: Stefan Scherer Date: Thu, 29 Mar 2018 22:46:59 +0200 Subject: [PATCH] Set tar header format to tar.FormatGNU --- post-processor/vagrant/util.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/post-processor/vagrant/util.go b/post-processor/vagrant/util.go index de80912bb..d7597f74a 100644 --- a/post-processor/vagrant/util.go +++ b/post-processor/vagrant/util.go @@ -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