Add stub implementations to make buildkitd buildable for Darwin#5276
Add stub implementations to make buildkitd buildable for Darwin#5276tonistiigi merged 1 commit intomoby:masterfrom
Conversation
| COPY --link --from=buildkitd /usr/bin/buildkitd / | ||
|
|
||
| FROM scratch AS binaries-darwin | ||
| COPY --link --from=buildkitd /usr/bin/buildkitd / |
There was a problem hiding this comment.
We do not want to ship stub buildkitd binary for macos users.
There was a problem hiding this comment.
Okay, will remove from here. Do you want me to add another job that would check that it compiles?
There was a problem hiding this comment.
You can add it to this matrix:
buildkit/.github/workflows/test-os.yml
Lines 33 to 35 in ea6f91e
matrix:
platform:
- windows/amd64
- freebsd/amd64
- darwin/amd64There was a problem hiding this comment.
If I read things properly, that job goes through the same Dockerfile target (binaries-darwin), so it won't build buildkitd.
There was a problem hiding this comment.
Hum right it will build binaries-for-test target:
buildkit/.github/workflows/test-os.yml
Line 57 in ea6f91e
Lines 102 to 106 in ea6f91e
Lines 367 to 371 in ea6f91e
We would just want buildctl and buildkitd
There was a problem hiding this comment.
Soo... Do you want me to add COPY --link --from=buildkitd /usr/bin/buildkitd / to binaries-for-test? It will do redundant work for other platforms, but I don't see any other good way.
There was a problem hiding this comment.
I guess we can create a dedicated job in test-os workflow to build buildkitd target for darwin/amd64 platform. I can push these changes to your branch if you want.
There was a problem hiding this comment.
I can push these changes to your branch if you want.
That would be cool!
98a8fdd to
fdd356a
Compare
| platform=${{ matrix.platform }} | ||
| echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV | ||
| if [ "${platform}" = "darwin/amd64" ]; then | ||
| echo "BUILD_TARGET=buildkitd" >> $GITHUB_ENV |
There was a problem hiding this comment.
@crazy-max It looks like you stopped building buildctl this way. I have no experience with docker/bake-action, is it possible to ask it to build multiple targets?
There was a problem hiding this comment.
I changed the workflow to create a dedicated job instead to just build buildkitd. buildctl is already built here:
buildkit/.github/workflows/buildkit.yml
Line 69 in b60d621
e.g., https://github.com/moby/buildkit/actions/runs/10665890596/job/29560219583
There was a problem hiding this comment.
Looks good, thanks for help
e187bc8 to
aeb1014
Compare
tonistiigi
left a comment
There was a problem hiding this comment.
So what's the benefit of this? I would get if some packages are useful for darwin and we want to make sure that they are buildable. But why build a broken buildkitd. Why make executor "buildable" when there really is no implementation. Why make source/git "buildable" while with this PR it would just fail on runtime as soon as it would get called?
We have no intention of actually supporting macos as target via some non-container execution mechanism https://github.com/moby/buildkit/blob/master/PROJECT.md#project-scope .
|
WRT WRT executor: I do not agree that there is no implementation. Everything that buildkit needs is to call containerd (and current PR enables containerd worker). There are multiple containerd runtimes that work on Darwin, for example https://github.com/ukontainer/runu/ I do not expect any significant Darwin-specific changes to buildkit besides current PR. |
aeb1014 to
d836200
Compare
Signed-off-by: Marat Radchenko <marat@slonopotamus.org>
d836200 to
64f4631
Compare
|
Looks like CI failed on |
These changes are extracted from #4059. Other half was already merged in #5271.
localmounter_darwin.gois fully identical tolocalmounter_freebsd.goexcept that it usesbindmount type instead of FreeBSD-specificnullfs.Not sure whether you want to enable CI job for Darwin
buildkitd, I'm absolutely OK if that will be omitted from current PR.