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

Add support for RAUC file parsing #132

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

Add support for RAUC file parsing #132

wants to merge 2 commits into from

Conversation

b-rowan
Copy link
Contributor

@b-rowan b-rowan commented Sep 10, 2024

Allow parsing of RAUC files using PySquashFsImage.

Closes #131

goosebit/updates/swdesc/__init__.py Dismissed Show dismissed Hide dismissed
Copy link
Collaborator

@tsagadar tsagadar left a comment

Choose a reason for hiding this comment

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

Not sure if it is a bit too aggressive to already add RAUC support. It is not only about the file format but also about being able to document / test its usage. I'd expect minor differences in comparison with SWUpdate.

Some more open things

  • Adding db migrations (as discussed in aerich cannot generate migrations #133)
  • Adjusting documentation
  • Exposing image type in UI? Currently the type is stored but never used
  • Squash the "[pre-commit.ci]" commit? Or is the idea not to run the code formatting tools and have a lot of those commits on main?

try:
# specified as optional in the RAUC docs
swdesc_attrs["version"] = semver.Version.parse(manifest["update"].get("version") + ".0")
swdesc_attrs["compatibility"] = [{"hw_model": "default", "hw_revision": manifest["update"]["compatible"]}]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Having a hard-coded hw_model "default" means that only a single hardware (platform) is supported to be managed in goosebit. Seems very limiting.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree, but I wasn't seeing how multiple types of compatibility would be added in the manifest when looking at the docs. Possible I'm missing something, but my thought was that is someone ran into this specific issue we would need their manifest file for an example of how to do it.

goosebit/updates/swdesc/rauc.py Show resolved Hide resolved
goosebit/updates/__init__.py Outdated Show resolved Hide resolved
goosebit/updates/swdesc/__init__.py Outdated Show resolved Hide resolved
Copy link

filepath function error SUBTOTAL
tests/updates/test_swdesc.py tests/updates/test_swdesc.py 1 1
TOTAL 1 1

Allow parsing of RAUC files using `PySquashFsImage`.  DB still needs migration.
Adds migration for DB to add new values.
@easybe
Copy link
Collaborator

easybe commented Sep 13, 2024

I think it is a good idea to support RAUC as long as we don’t have to completely refactor the application at this point. IMHO we should focus on making what we have production-ready and then go from there.

@b-rowan
Copy link
Contributor Author

b-rowan commented Sep 13, 2024

I think it is a good idea to support RAUC as long as we don’t have to completely refactor the application at this point. IMHO we should focus on making what we have production-ready and then go from there.

I agree here. This was relatively easy to throw together, so if we don't want to add this right now I will leave as a draft for reference.

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

Successfully merging this pull request may close these issues.

Does goosbit support RAUC packages?
4 participants