diff --git a/.github/workflows/windows.yaml b/.github/workflows/windows.yaml index e5e07ba1..fe6a1eb7 100644 --- a/.github/workflows/windows.yaml +++ b/.github/workflows/windows.yaml @@ -39,5 +39,5 @@ jobs: - name: Unit test env: SKIP_INTEGRATION_TESTS: 1 - run: go test -mod=vendor -v ./client/... ./frontend/dockerfile/... ./session/... ./source/... ./util/... + run: go test -mod=vendor -v ./cache/... ./client/... ./frontend/dockerfile/... ./session/... ./source/... ./util/... working-directory: src/github.com/moby/buildkit diff --git a/cache/contenthash/filehash.go b/cache/contenthash/filehash.go index 27890421..0b526710 100644 --- a/cache/contenthash/filehash.go +++ b/cache/contenthash/filehash.go @@ -49,7 +49,6 @@ func NewFromStat(stat *fstypes.Stat) (hash.Hash, error) { return nil, err } hdr.Name = "" // note: empty name is different from current has in docker build. Name is added on recursive directory scan instead - hdr.Mode = int64(chmodWindowsTarEntry(os.FileMode(hdr.Mode))) hdr.Devmajor = stat.Devmajor hdr.Devminor = stat.Devminor diff --git a/cache/contenthash/filehash_unix.go b/cache/contenthash/filehash_unix.go index 4f610d77..ccd2ebd2 100644 --- a/cache/contenthash/filehash_unix.go +++ b/cache/contenthash/filehash_unix.go @@ -12,10 +12,6 @@ import ( "golang.org/x/sys/unix" ) -func chmodWindowsTarEntry(perm os.FileMode) os.FileMode { - return perm -} - func setUnixOpt(path string, fi os.FileInfo, stat *fstypes.Stat) error { s := fi.Sys().(*syscall.Stat_t) diff --git a/cache/contenthash/filehash_windows.go b/cache/contenthash/filehash_windows.go index e15bf1e5..c6bfce9e 100644 --- a/cache/contenthash/filehash_windows.go +++ b/cache/contenthash/filehash_windows.go @@ -8,16 +8,6 @@ import ( fstypes "github.com/tonistiigi/fsutil/types" ) -// chmodWindowsTarEntry is used to adjust the file permissions used in tar -// header based on the platform the archival is done. -func chmodWindowsTarEntry(perm os.FileMode) os.FileMode { - perm &= 0755 - // Add the x bit: make everything +x from windows - perm |= 0111 - - return perm -} - func setUnixOpt(path string, fi os.FileInfo, stat *fstypes.Stat) error { return nil }