Open rchincha opened 4 months ago
+++ b/oci/layer/tar_extract.go
@@ -380,7 +380,9 @@ func (te *TarExtractor) overlayFSWhiteout(dir string, file string) error {
- err := te.fsEval.Mknod(p, unix.S_IFCHR|0666, unix.Mkdev(0, 0))
+ err := te.fsEval.Lsetxattr(dir, "user.overlay.opaque", []byte("y"), 0)
If the tar contents are
/a/.wh.b /a/b/c/d
and we use a tar extractor with overlayfs whiteout option (assuming I want to overlayfs the unpacked layers), then at: https://github.com/opencontainers/umoci/blob/main/oci/layer/tar_extract.go#L490 ^ a mknod happens when /a/.wh.b is encountered.
However, when /a/b/c/d is encountered, cannot really do a mkdir /a/b/c/ at: https://github.com/opencontainers/umoci/blob/main/oci/layer/tar_extract.go#L513 ^ since /a/b is a non-dir entry.
There are two ways to fix this:
@cyphar Thoughts?