Skip to content

Ignore com.apple. extended file attributes in contenthash #5899

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tylermichael
Copy link

@tylermichael tylermichael commented Apr 9, 2025

I'm not sure if this is the correct location to make this change, but this PR attempts to fix docker/for-mac#7636 by ignoring com.apple. extended file attributes in the file content hash.

I feel like this is an appropriate action to take because I don't believe extended file attributes are enabled in the linux Docker VM filesystem on Mac, so Mac specific file attributes should not even be taken into account when calculating content hashes.

@tonistiigi
Copy link
Member

This should be done in the xattr loader loadXattr https://github.com/moby/buildkit/blob/master/vendor/github.com/tonistiigi/fsutil/stat_unix.go#L15 or in the client side Map function https://github.com/moby/buildkit/blob/master/vendor/github.com/tonistiigi/fsutil/filter.go#L33 passed by buildkit when running the transfer of local files.

@jsternberg
Copy link
Collaborator

I tried my hands at putting this into fsutil and created a PR here modeled off of this one.

I'm not sure if here or in the buildkit client is more appropriate for this functionality, but I figure that it probably doesn't overly matter that much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

com.apple.provenance extended file attribute busts remote layer cache from cache-from
4 participants