Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify explanation of Verity= option #3121

Merged
merged 1 commit into from
Oct 10, 2024
Merged

Conversation

septatrix
Copy link
Contributor

@septatrix septatrix commented Oct 10, 2024

This clarifies that the "auto" value for the verity option only really makes sense for extension images.

Alternative solution: Implement Verity= as an enum option which accepts off/no, hash, and signature (similar to the repart option - or off/verity/signed, similar to systemd.image-policy). If set to "off", no checking is performed and unsigned extension images are build. If set to "hash", mkosi asserts that the generated image contains a verity partition (and creates extension images with a verity partition? - not sure how useful). If set to "signature", mkosi asserts that key+certificate are present and checks that the resulting image contains a verity-sig partition.

I actually like the alternative solution a bit more but won't have time until next week to work on it so I wanted to get this quick clarification out there for now.

key and certificate will be passed to systemd-repart if available,
the extension images produced by systemd-repart. If set to `auto` and
a verity key and certificate are present, mkosi will pass them to systemd-repart
and expect the generated disk image to contain verity partition,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

partitions

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also "expects"

Suggested change
and expect the generated disk image to contain verity partition,
and expects the generated disk image to contain verity partitions,

This clarifies that the "auto" value for the verity option
only really makes sense for extension images.
@DaanDeMeyer DaanDeMeyer merged commit 9087457 into systemd:main Oct 10, 2024
35 of 36 checks passed
@septatrix
Copy link
Contributor Author

Do you think my other idea still makes sense?

@septatrix septatrix deleted the patch-4 branch October 10, 2024 15:31
@DaanDeMeyer
Copy link
Contributor

Do you think my other idea still makes sense?

Yeah makes sense happy to review a PR for that. You'd have to introduce a Verity enum with hash, signature and none and then use config_make_enum_parser_with_boolean

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants