vendor: github.com/moby/buildkit v0.22.0-rc1

Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax
2025-05-14 20:10:27 +02:00
parent 2e3108975d
commit 7a54b6ee7e
73 changed files with 723 additions and 270 deletions
+19 -3
View File
@@ -5,6 +5,7 @@ package fsutil
import (
"os"
"strings"
"syscall"
"github.com/containerd/continuity/sysx"
@@ -12,6 +13,8 @@ import (
"github.com/tonistiigi/fsutil/types"
)
const xattrApplePrefix = "com.apple."
func loadXattr(origpath string, stat *types.Stat) error {
xattrs, err := sysx.LListxattr(origpath)
if err != nil {
@@ -23,16 +26,29 @@ func loadXattr(origpath string, stat *types.Stat) error {
if len(xattrs) > 0 {
m := make(map[string][]byte)
for _, key := range xattrs {
v, err := sysx.LGetxattr(origpath, key)
if err == nil {
if skipXattr(key) {
continue
}
if v, err := sysx.LGetxattr(origpath, key); err == nil {
m[key] = v
}
}
stat.Xattrs = m
if len(m) > 0 {
stat.Xattrs = m
}
}
return nil
}
func skipXattr(key string) bool {
if strings.HasPrefix(key, xattrApplePrefix) {
return true
}
return false
}
func setUnixOpt(fi os.FileInfo, stat *types.Stat, path string, seenFiles map[uint64]string) {
s := fi.Sys().(*syscall.Stat_t)