-
Notifications
You must be signed in to change notification settings - Fork 247
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
fix: use GNU tar on macOS for OCIContainer interactions #1434
Conversation
macOS uses BSD tar as the default `tar` command. This can result in hard to debug issues when building linux wheels on macOS because of incompatibilities between GNU tar (used inside containers) & BSD tar (used on host). This commit tries to use GNU tar on the host macOS and warns if it is not found.
For a bit of context, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PR looks good to me. What were the symptoms of the tar incompatibility, as you saw? I'm just wondering if we could set some flags on BSD tar to force it to be compatible? Or even use pax
instead, which is also preinstalled on macos.
GNU tar was extracting some of the files produced by BSD tar as "sparse" (I don't know much about this):
vs
Using |
I converted to draft because I need to run some more checks (the image is alpine in my case so: does it only impact musllinux & shall something be done in there ?). |
So in fact it's not an issue between BSD tar & GNU tar that I'm seeing but with BusyBox tar used in musllinux images. It seems there's also a I'll probably add GNU tar to musllinux images in any cases. |
Gotcha, thanks for the info.
Ah, my apologies, I was not clear, I meant to use the (Please take these comments only as ideas, I'm happy with the current change as-is.) |
Oops, our replies overlapped there.
Interesting! I suppose we still don't know what that 'unknown extended header keyword' is, it might not be relevant/critical, though it's kinda a smell.
I don't have that option on my machine, running macOS 13.2.1...
|
It's not listed in
If/When GNU tar is added to musllinux, agreed. Otherwise, that still leave to debug issues on musllinux (where I didn't see those warnings). |
With GNU tar added in musllinux images, I'm closing this PR. |
This allows to build Linux wheels locally on macOS. c.f. pypa/cibuildwheel#1434
macOS uses BSD tar as the default
tar
command.This can result in hard to debug issues when building linux wheels on macOS because of incompatibilities between GNU tar (used inside containers) & BSD tar (used on host).
This commit tries to use GNU tar on the host macOS and warns if it is not found.