deploy: Don't fail if loading composefs configuration fails due to missing keys
authorAlexander Larsson <alexl@redhat.com>
Wed, 21 Feb 2024 09:16:31 +0000 (10:16 +0100)
committerAlexander Larsson <alexl@redhat.com>
Wed, 21 Feb 2024 09:21:00 +0000 (10:21 +0100)
commitb7688609b53895682c5cf768e8d17b8431df2a4b
treeb18e6b907eb169bbbfff8f02c3486f6b79ed1638
parent255d40d79b5fb24f5068c92e2ddf96426d081bf9
deploy: Don't fail if loading composefs configuration fails due to missing keys

When we load the configuration during deploy we don't need to actually
use the keys, so avoid loading them. This fixes an issue we had where
this broke the initial deploy becasue of a failure to load the key. In
our case it fails because the code looks for the config file in the
deploy dir, but then for the binding key in the real root.

However, even if it were to look for the key in the deploy dir I don't
think it necessarily has to be in the rootfs, it could be only in the
initrd.

This fixes https://github.com/ostreedev/ostree/issues/3188
src/libostree/ostree-sysroot-deploy.c
src/libotcore/otcore-prepare-root.c
src/libotcore/otcore.h
src/switchroot/ostree-prepare-root.c