checkout: Only verify digest if repo requires fsverity
authorColin Walters <walters@verbum.org>
Wed, 30 Oct 2024 14:07:26 +0000 (10:07 -0400)
committerColin Walters <walters@verbum.org>
Mon, 4 Nov 2024 18:01:55 +0000 (13:01 -0500)
commit6ed1f83ab80b74cc20c8b48b94d1991cfbdbf569
tree05d3dce7e19624512977750cc120d4bdf076b85f
parentab8a7f7855b0e0a7f3fe7214b77521268b994ce4
checkout: Only verify digest if repo requires fsverity

Fixes a regression from the previous commit; in
the case where the target repo doesn't have composefs in
signed mode there's no reason to verify the digest
at checkout time because we aren't verifying it at
boot time either.

The regression is in cases that use rpm-ostree e.g.
where as of recently we unconditionally add the composefs
digest, but for e.g. FCOS we aren't deploying with fsverity
enabled.

Closes: https://github.com/ostreedev/ostree/issues/3330
Signed-off-by: Colin Walters <walters@verbum.org>
src/libostree/ostree-repo-checkout.c
tests/inst/src/composefs.rs
tests/test-composefs.sh