ci: add postmarketOS to integration testing#4297
Conversation
|
This opensuse tools tree failure seems unrelated to my changes, it's also failing when building images for other distros: |
|
Thanks for this! Yeah, opensuse is borked at the moment and nobody had time to investigate yet. |
|
@craftyguy We can mess around a bit, you can add a step to the mkosi action to download a static apk (check the hash ofc) and together with #4313 we'll be able to build from ubuntu |
|
If you rebase we now install apk in the github action |
|
@craftyguy could you rebase this? I think it would be great if we could land this before any larger work on the integration tests, like #4357, happens. |
af935f7 to
39fd928
Compare
|
@behrmann rebased, and got pmOS-related tests passing now |
|
This fails opensuse's Update: The two failures above are the same reason, suse repo download timeouts/failures. ✔️ |
martinpitt
left a comment
There was a problem hiding this comment.
Thanks @craftyguy ! I have some questions, and the commit series could use some squashing and reordering, but by and large this looks great!
| - debian | ||
| - fedora | ||
| - opensuse | ||
| - postmarketos |
There was a problem hiding this comment.
Is pOS actually meant to be a dev platform where you would run things like mkosi to build e.g. ubuntu? If not, testing with a pOS tools tree feels like a waste (we already run into serious github runner capacity issues). If so, then fine of course.
If this gets dropped, the excludes from below can be reduced.
There was a problem hiding this comment.
In theory, yes, it's a general purpose distro that happens to run on phones (among many other things). In practice, I have no idea who is doing dev work on other distros using mkosi on pmOS. We do have users running other distros in containers with podman, docker, and VMs.
I enabled these because it's what was done for other distros, but I'd be OK with removing them if it makes your CI load lighter and re-adding them IIF people start reporting issues e.g. building ubuntu on pmOS with mkosi.
wdyt?
There was a problem hiding this comment.
I'm on the fence, and as I haven't yet earned the right to make large directional decisions for mkosi: @behrmann @daandemeyer WDYT?
There was a problem hiding this comment.
Generally, I think, that a lot of the matrix of our build tests covers test cases people will probably never do, since e.g. I assume there's little overlap between Arch and CentOS target audiences. I kinda don't want to make pmOS a second class citizen, but it's also clear that this grows quadratically, which isn't great either.
That being said. Even if we only test pmOS as a target from various distros and don't build other distros from pmOS, I really would always want to see that pmOS builds from a pmOS tools tree.
There was a problem hiding this comment.
Even if we only test pmOS as a target from various distros and don't build other distros from pmOS, I really would always want to see that pmOS builds from a pmOS tools tree.
Sounds good to me, and we can always adjust later if necessary. So IIUC, only enable:
- build pmOS on pmOS
- build pmOS on everything
And I would not enable:
- build everything on pmOS
I kinda don't want to make pmOS a second class citizen
I (a pmOS dev) definitely don't feel like a second class citizen here, so don't worry :P
There was a problem hiding this comment.
@behrmann ok I think I got this implemented. Now pmOS is built in other distro tools trees (that have apk available) and no distros are built with a pmOS tools tree (other than pmOS). I had to add to the "include:" list to get pmOS building with pmOS tools tree.
busybox's losetup, mount, and umount are missing many options supported by the "full" versions so the "full" versions are added sfdisk is packaged separately from util-linux on Alpine Linux
sulogin is packaged separately on Alpine Linux, and this other pkg is not pulled in automatically. Fixes emergency shell in the initrd device-mapper is not pulled in automatically as a dependency, and needed for lvm support
On Alpine/pmOS, the EFI stub is split into a separate systemd-efistub package rather than being bundled with systemd-boot, so it needs to be added to the tools tree so mkosi can find it when building UKI/ESP images.
39fd928 to
36a1074
Compare
|
I had another look. If you revert the moving of |
8a360f2 to
2e662f3
Compare
/usr/local is cleaned up by ci.yml immediately after actions.yaml adds apk into that dir, which leads to job that try to use apk to fail with "apk not found"
2e662f3 to
abc2c67
Compare
|
Modulo the concerns about the size of the build matrix this LGTM. |
abc2c67 to
0dc5ecb
Compare
behrmann
left a comment
There was a problem hiding this comment.
Lovely, thank you! One last question
| sudo curl -fsSL -o /usr/local/bin/apk https://gitlab.alpinelinux.org/api/v4/projects/5/packages/generic/v3.0.6/x86_64/apk.static | ||
| echo 'f1489e05bace7d7dd0a687fcd38d50b585ac660af4231668b123649bef3718c4 /usr/local/bin/apk' | sha256sum --check | ||
| sudo chmod +x /usr/local/bin/apk | ||
| sudo curl -fsSL -o /usr/bin/apk https://gitlab.alpinelinux.org/api/v4/projects/5/packages/generic/v3.0.6/x86_64/apk.static |
There was a problem hiding this comment.
You didn't introduce this, but I wonder whether we have a good way of good way of keeping this up to date.
There was a problem hiding this comment.
The best idea I have is to use the gitlab API to get the latest release of apk-tools, get the checksum for it, then download/verify the apk.static binary for x86_64. the API is json, so it would be a handful of curl | jq lines.
If that seems like an OK approach, I can take a shot at implementing it
There was a problem hiding this comment.
That would be lovely, but that's for a later PR.
apk-tools isn't packaged in Ubuntu, so the scope of testing is limited quite a bit to only a handful of distros/tools trees that have apk available. This also means we're not able to test building images for other distros in a pmOS tools tree since the base distro is... 🥁... Ubuntu and it's unable to build a pmOS tools tree because it doesn't have apk-tools.