-
Notifications
You must be signed in to change notification settings - Fork 332
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
Extension repart definitions #3437
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First commit looks good, second one less so. Making the repart definitions for these output types a free for all does not seem like a good idea.
Can't you achieve what you need with Format=disk
and your own repart definitions instead?
I wanted to benefit from the extension release file generated by Another option would be a way to add And while we're at it: Why not use |
05c3c90
to
2d0efc5
Compare
Okay, pushed a proposal using the |
2d0efc5
to
610cfba
Compare
@hundeboll This is much worse, now the repart definitions have to be installed in the root filesystem or tools tree. That's exactly why we don't use --make-ddi= in the first place. |
I see. I'll revert that part. How about the other part - always using the signed repart definitions, and just exclude the signature partition when verity is off? Or would it be better with a |
@hundeboll Adding |
bd68892
to
64d0b7b
Compare
I added the Thanks for the hint on |
mkosi/config.py
Outdated
@@ -363,6 +363,13 @@ def __bool__(self) -> bool: | |||
return self != BuildSourcesEphemeral.no | |||
|
|||
|
|||
class Verity(StrEnum): | |||
yes = enum.auto() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's name this signed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's okay to break existing users of --verity=yes
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parse_boolean()
will take care of the boolean values
mkosi/resources/man/mkosi.1.md
Outdated
partition. If set to `auto` and a verity key and certificate are present, | ||
**mkosi** will pass them to systemd-repart and expects the generated disk | ||
image to contain verity partitions, but the build won't fail if no verity | ||
partitions are found in the disk image produced by **systemd-repart**. | ||
|
||
Note that explicitly disabling signed verity is not yet implemented |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This also needs to mention that Verity=hash
is not supported for the disk
output yet.
Setting don't-merge until we get another stable release out |
Building an unsigned extension image with verity hashes provides data integrity without needing a certificate on the target machine. Note that systemd-dissect and systemd-sysext doesn't automatically use the verity data has partition for validation. Both tools enables validation if the user.verity.roothash xattr is set for the image. For systemd-dissect, one can use the --root-hash option to enable the validation. The root hash can be obtained by concatenating the partition uuid's for the root and the root-verity partitions.
64d0b7b
to
f88f826
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this and implementing my proposal from #3121. However for consistency we should either reuse the nomenclature from either sd-repart or sd.image-policy. Those are off/hash/signature and off/verity/signed respectively
No description provided.