Update alpine for systemd-boot#4186
Conversation
75f5b94 to
d8f69e5
Compare
|
And I thought I was the only one crazy enough to do alpine updates. 😆 This PR looks good. The big shortcoming is that you need to build and push out alpine, and then all of the other dependent packages, which is not too bad, it just takes forever. And is why the tests are failing. I don't want to hold you up, so I can consider building and pushing it out, but if you can think of a sane way to get this into CI, so that it happens automatically, that would be great. During PR, it should be built and saved as an artifact to be used solely inside the PR; once merged to master, it should be published. Of course, you don't want to build all of them twice, once in PR and once after merge to master, since those are long slow builds. Thoughts? |
Signed-off-by: Chris Irrgang <chris.irrgang@gmx.de>
Signed-off-by: Chris Irrgang <chris.irrgang@gmx.de>
d8f69e5 to
e955946
Compare
Signed-off-by: Chris Irrgang <chris.irrgang@gmx.de>
Signed-off-by: Chris Irrgang <chris.irrgang@gmx.de>
Signed-off-by: Chris Irrgang <chris.irrgang@gmx.de>
Signed-off-by: Chris Irrgang <chris.irrgang@gmx.de>
Signed-off-by: Chris Irrgang <chris.irrgang@gmx.de>
Signed-off-by: Avi Deitcher <avi@deitcher.net>
Signed-off-by: Avi Deitcher <avi@deitcher.net>
Signed-off-by: Avi Deitcher <avi@deitcher.net>
Signed-off-by: Avi Deitcher <avi@deitcher.net>
e955946 to
45eb822
Compare
|
@ChrisIgel some of the commits were messed up. Not your fault, just has to do with the stages of stuff in alpine. When you do the build, it updates something in I rebuilt them and force-pushed to the branch. Before trying any changes, be sure to pull down with a I pushed out the alpine updates, and am pushing out all of the other packages. Will update when done. |
|
In the meantime, if you have ideas about how to make the alpine update better, all for it. |
Signed-off-by: Avi Deitcher <avi@deitcher.net>
Signed-off-by: Avi Deitcher <avi@deitcher.net>
Signed-off-by: Avi Deitcher <avi@deitcher.net>
Signed-off-by: Avi Deitcher <avi@deitcher.net>
|
So if I understand it correctly the order of necessary steps would be this:
Of course if no changes to alpine or tools were made these steps can be omitted. They should probably be inserted into the So the main problem then is the multi-arch builds with buildx won't work locally without pushing first, right? So all other Dockerfiles referencing the new unpushed alpine tag won't work. I can think of three solutions currently:
I think number 3 is probably the most promising, albeit being experimental. I did the following locally and it worked: cd tools/alpine
# build the alpine images
docker buildx build --platform linux/amd64,linux/arm64,linux/riscv64 --no-cache --load -t linuxkit/alpine:a5085830bac643ce1e2230d1675195807c9a55f6 .
# check the local image cache
docker image ls --tree -a
# should show something like this:
# IMAGE ID DISK USAGE CONTENT SIZE
# linuxkit/alpine:a5085830bac643ce1e2230d1675195807c9a55f6 9f652e7faaa7 3.91GB 2.93GB
# ├─ linux/amd64 2bee1befda0e 1.92GB 952MB
# ├─ linux/arm64 6e2487c7c90d 901MB 901MB
# └─ linux/riscv64 50e84056eb26 1.08GB 1.08GBAfter that building Dockerfiles locally referencing docker buildx build --platform linux/amd64,linux/arm64,linux/riscv64 -f Dockerfile -t test .
# result:
# IMAGE ID DISK USAGE CONTENT SIZE
# test:latest 0d7df5a151ab 3.91GB 2.93GB
# ├─ linux/amd64 2bee1befda0e 1.92GB 952MB
# ├─ linux/arm64 6e2487c7c90d 901MB 901MB
# └─ linux/riscv64 50e84056eb26 1.08GB 1.08GBThis showed the same correct hashes as the base image which is the expected behavior. Let me know what you think or if I even got the main problem. |
|
There are a few issues that kind of mix together here. I will try and separate them out, and then address what you wrote.
Let's start with the second. You wrote this: It is slightly different.
There are some test packages and such, but those are details. Notice that you actually don't need to build anything in order to get the downstream info. If I update If we could find a way to calculate all of that without the full build of all arch, then the process becomes easier: make your changes in alpine, and everywhere downstream, commit, push out, then worry about builds. The issue with "building takes time", is the reason we mostly push packages out by hand. If we didn't, the following would be the process:
That is slow and quite wasteful, but not awful. The only time you really run into problems is when building the kernel, or when you update alpine, which means you changed a lot of downstream packages and rebuild them all. |
That is the reason that linuxkit has its own cache. When we first created it, docker didn't have the containerd storage backend at all. Then it was designed, planned, and slowly implemented. If we could rely on it always being there, and we could access the images to feed them into buildkit the way we do now with lkt cache images, the lkt cache could go away (and I would be quite pleased). But I don't see how using docker containerd cache vs lkt cache solves the issues? |
multi-arch builds with buildx do work. Actually, I don't think our CI builds tools (including alpine) at all. It builds packages here, but no tools. That might be useful. |
|
BTW CI is almost green, we can merge it in after. |
|
Merged in. We should continue the alpine+packages discussion though. |
- What I did
Added systemd-boot to the tools/alpine package in preparation for #4183.
- How I did it
Followed the
alpine-base-update.md.- How to verify it
- Description for the changelog
Add systemd-boot to alpine and update package versions