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

Image type detection to include ".verity" rootfs extension #1177

Open
Gerry546 opened this issue Jun 28, 2023 · 6 comments · May be fixed by #1435
Open

Image type detection to include ".verity" rootfs extension #1177

Gerry546 opened this issue Jun 28, 2023 · 6 comments · May be fixed by #1435
Labels
enhancement Adds new functionality or enhanced handling to RAUC

Comments

@Gerry546
Copy link

Gerry546 commented Jun 28, 2023

Is your feature request related to a problem? Please describe.
Currently I'm working on integrating dm-verity support together with RAUC in a system.
Using the bbclass provided in meta-security (https://gitlab.com/akuster/meta-security/-/blob/master-next/classes/dm-verity-img.bbclass) to add verity support to the image this class will ensure that the rootfs images are in the DEPLOYDIR and all are appended with .verity. These can then be included in .wic and bundles via raw copies as specified in the RAUC documentation.
As mentioned in the RAUC docs my system.conf is adjusted to do raw copies only. This also has as a consequence (AFAIK) that the rootfs bundled into the image needs to have the .img extension for the RAUC installer to properly handle the raw type.

Describe the solution you'd like
Ensure the RAUC understands any rootfs slot with the extension .verity (such as .ext4.verity, .btrfs.verity) when handling a raw copy.

Describe alternatives you've considered
Fow now I have patched rauc v1.9 to enable these.
Alternatively I was considering to simply rename the files during a build such that RAUC will correctly pick them up.

@Gerry546 Gerry546 added the enhancement Adds new functionality or enhanced handling to RAUC label Jun 28, 2023
@ejoerns
Copy link
Member

ejoerns commented Jun 28, 2023

@Gerry546 It's always a compromise between what we say are supported standard image types that we should have in the list and which are just some special cases following a custom naming convention. In the past we have adapted some of the built-in supported file name extensions to match at least what oe-core provides you. I am not sure if we should also cover meta-security or if this in the end makes the mapping scheme too complex and confusing.

So for now, what should work and should be supported by meta-rauc, in case you use this for integration is to use

RAUC_SLOT_verity[type] = file

This will let meta-rauc add a generic .img to the original file name and this in turn will then be correctly recognized and handled by the img_to_raw_handler in RAUC. Would that be sufficient for your use case?

@Gerry546
Copy link
Author

Gerry546 commented Jul 6, 2023

I understand your comment and it is indeed always a compromise.
I will try with the type = file and the .img extension to see if this works.

Thank you for the comment so far

@jluebbe
Copy link
Member

jluebbe commented Aug 3, 2023

@Gerry546 Is this issue solved for you?

@Gerry546
Copy link
Author

Gerry546 commented Aug 3, 2023

@jluebbe The issue can be considered resolved. I understand the necessary tradeoff between 'commonly' used data and extension types (like mentioned in #1201 ) and the need to keep this system to a sort of standarized set of items.
I would still argue for the inclusion of more data types since the proposed .img types is not one of the native types supported out of the box as dictated here I believe: https://docs.yoctoproject.org/ref-manual/variables.html?highlight=image_fstypes#term-IMAGE_TYPES.

@Louson
Copy link

Louson commented May 24, 2024

Hello. Sorry to resurrect the post (but the issue wasn't closed). Could we have fallbacks for every destination in update_handlers.c, in the updatepairs list ?

For example:

        {"*", "ext4", img_to_fs_handler},
        {"*", "raw", img_to_raw_handler},
        {"*", "ubivol", img_to_ubivol_handler},

So we don't include anything about verity

@Louson
Copy link

Louson commented May 24, 2024

@Gerry546 It's always a compromise between what we say are supported standard image types that we should have in the list and which are just some special cases following a custom naming convention. In the past we have adapted some of the built-in supported file name extensions to match at least what oe-core provides you. I am not sure if we should also cover meta-security or if this in the end makes the mapping scheme too complex and confusing.

So for now, what should work and should be supported by meta-rauc, in case you use this for integration is to use

RAUC_SLOT_verity[type] = file

This will let meta-rauc add a generic .img to the original file name and this in turn will then be correctly recognized and handled by the img_to_raw_handler in RAUC. Would that be sufficient for your use case?

Unfortunately, that does not solve the issue if the destination is a ubi volume

@Louson Louson linked a pull request May 24, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Adds new functionality or enhanced handling to RAUC
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants