diff --git a/TODO b/TODO index 31b1519..21ca64e 100644 --- a/TODO +++ b/TODO @@ -41,8 +41,6 @@ TODO * Make actions using (host) commands check their existance early -* Ensure we copy xattrs? - * Fix race in qemu-helper (if qemu-user-static gets installed in the system chroot things will get confused) diff --git a/actions/pack_action.go b/actions/pack_action.go index cf78cb0..b8f28a7 100644 --- a/actions/pack_action.go +++ b/actions/pack_action.go @@ -35,5 +35,7 @@ func (pf *PackAction) Run(context *debos.DebosContext) error { outfile := path.Join(context.Artifactdir, pf.File) log.Printf("Compressing to %s\n", outfile) - return debos.Command{}.Run("Packing", "tar", "czf", outfile, "-C", context.Rootdir, ".") + return debos.Command{}.Run("Packing", "tar", "czf", outfile, + "--xattrs", "--xattrs-include=*.*", + "-C", context.Rootdir, ".") } diff --git a/archiver.go b/archiver.go index e67fdf6..c54f89c 100644 --- a/archiver.go +++ b/archiver.go @@ -99,6 +99,8 @@ func (tar *ArchiveTar) Unpack(destination string) error { } command = append(command, "-C", destination) command = append(command, "-x") + command = append(command, "--xattrs") + command = append(command, "--xattrs-include=*.*") if compression, ok := tar.options["tarcompression"]; ok { if unpackTarOpt := tarOptions(compression.(string)); len(unpackTarOpt) > 0 {