eve
eve copied to clipboard
Should explicitly specify what arches we want to build eve packages for
We use make eve in the root to call linuxkit pkg build with the build.yml from pkg/eve/build.yml. That does not specify explicitly which arches are supported, so a future call to pkg build will try to build for lots of things that might or might not suit us.
This makes it explicit.
cc @vmlemon @rvs
Related to this
Sure. Just call it as lkt pkg build <path> --platforms=linux/arm64 or whatever you're in. Stick it in the makefile where we already do that.
Hmm, would https://github.com/tonistiigi/xx be of any use to us, for this kind of thing? I stumbled across it, whilst watching some of the DockerCon videos, earlier on.
No, we don't need any of that @vmlemon -- nice find tho
Btw @deitch it sounds like with the explicit invocation of linuxkit you suggested above -- we should close this PR?
Correct.
How did you find time to watch those videos @vmlemon :-)
Actually I'm going to change that. The explicit platforms invocation is independent of this PR. This PR sets the default for when you do not explicitly set platforms. When you explicitly do - as suggested above - the arches part of build.yml is ignored. Consider this a "safety net" for when someone runs it without explicit platforms (only do these platforms, not every one linuxkit can think of), as well as good indication / documentation what platforms are supported.
I would merge this in for those reasons, and then do the explicit --platforms to restrict it to just one platform when running.
Correct.
How did you find time to watch those videos @vmlemon :-)
Copious amounts of coffee, snacks, and planning out which sessions were most interesting, before ending up staying awake until 2am. The time boundaries also kinda-helped, since the videos were just short enough, that the start/end of each overlapped... :)
Consider this a "safety net"
The problem with looking at it as a safety net @deitch is that it is broken -- attempting to cross-build eve packages (specifically) will result in ether failure or worse yet producing an incorrect container. Both of these are not what I would call a safety net.
Specifically for eve -- it really has to be somehow the platform I'm running on. Which brings me to: it really would be helpful if there was a way to say:
arches:
- self
Which would mean that the package is declaring itself to be safe to be built on any architecture as long as cross-compilation is not involved.
The problem with looking at it as a safety net @deitch is that it is broken
I don't understand why it is broken. It doesn't say, "I will prevent you from building any other arches." If you specify pkg build --platforms=foo, it will let you build for foo. If you specified foo, you are more than smart enough to know that was what you wanted to build.
attempting to cross-build eve packages (specifically) will result in ether failure or worse yet producing an incorrect container. Both of these are not what I would call a safety net.
If eve cross-building fails, let's fix it. But pkg build does what it is expected to:
- if you specified
--platforms, build for that - if you did not, build for the "default arches" specified in the file
arches:
- self
I don't see the maintainers agreeing to that. Why would I want to say, "this is safe to build as long as cross-compilation is not involved"?
I don't understand why it is broken.
It is broken because running make eve with your changes will produce a package with a broken content for non-host arch.
I think we need to discuss it in a more 1-1 way at this point -- since it is clearly that both of us are missing some crucial details here.
Hey @deitch -- shouldn't this be closed in favor of #2115 ?
Nope. This is about what platforms I build for in my current command, not creating an index. Two distinct things.
@deitch do we close this?
Yeah we can for now.