bootloader/grub2: Don't do anything if we have static configs
authorColin Walters <walters@verbum.org>
Tue, 27 Feb 2024 18:14:16 +0000 (13:14 -0500)
committerColin Walters <walters@verbum.org>
Tue, 27 Feb 2024 19:21:26 +0000 (14:21 -0500)
commite47b37096343efa3bea8295f3f44c4dc90cc04e2
tree1c6c9c841984f5a586235beb5457c7a748caa290
parent1b3ffe54e87c108b576a528efa6493f935a80f27
bootloader/grub2: Don't do anything if we have static configs

This builds on top of https://github.com/coreos/bootupd/pull/609/commits/fa9924e4fe403c3751392c041cd98614a2cc3611
(But in a very hacky way because we don't currently link to a JSON library)

Basically, bootupd supports injecting static configs, and this
is the currently least hacky way for us to detect this and understand
that we shouldn't try to run `grub2-mkconfig`.

A further patch I'd like to do here is also change the probing
logic to gracefully no-op if `grub2-mkconfig` doesn't exist,
but that has a bit more risk and involvement.
src/libostree/ostree-bootloader-grub2.c
tests/kolainst/destructive/bootupd-static.sh [new file with mode: 0755]