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

rauc: split package into 'rauc' for binary and 'rauc-conf' for configuration #147

Merged
merged 2 commits into from
Feb 29, 2024

Conversation

ejoerns
Copy link
Member

@ejoerns ejoerns commented Oct 2, 2020

rauc: split package into 'rauc' for binary and 'rauc-conf' for configuration

This allows to build 'rauc' with default TUNE_PKGARCH while only 'rauc-conf' needs to be build for MACHINE_ARCH as it contains MACHINE-specific configuration.

Another point is that the RAUC configuration may not only by MACHINE-specific but may also differ between images (for the same MACHINE).

The rauc target package now RRECOMMENDS rauc-conf to pull this in by default.

For providing your own configuration, either bbappend the existing rauc-conf recipe, write a new one that provides 'virtual-rauc-conf' and set PREFERRED_PROVIDER_virtual-rauc-conf or just write a custom one and add it to your image's IMAGE_INSTALL list (or any packagegroup).

Either way, this requires migration in your rauc recipe(s)!

@ejoerns ejoerns added enhancement requires migration Change that requires to migrate existing integrations to new handling labels Oct 2, 2020
@ejoerns
Copy link
Member Author

ejoerns commented Aug 23, 2021

rebased onto master

Copy link
Contributor

@OnkelUlla OnkelUlla left a comment

Choose a reason for hiding this comment

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

Just two suggestions.

recipes-core/rauc/rauc-conf.bb Show resolved Hide resolved
recipes-core/rauc/rauc-conf.bb Show resolved Hide resolved
Copy link
Member

@jluebbe jluebbe left a comment

Choose a reason for hiding this comment

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

With the RDEPENDS += "rauc-conf" it should be obvious enough to people updating from previous versions that the system.conf would need to move to rauc-conf. Perhaps add a hint regarding that to the commit message nevertheless?

recipes-core/rauc/rauc-conf.bb Outdated Show resolved Hide resolved
@mschwan-phytec
Copy link
Contributor

@ejoerns Any news on this PR? Would be nice to see it being merged. 🙂 It would make custom configurations a lot easier to handle.

@ejoerns
Copy link
Member Author

ejoerns commented Jul 20, 2022

Indeed.

And I currently work myself on a project where this should be quite useful, too.
If I find the time, I will test this again in and make it ready for being merged.

@ejoerns ejoerns self-assigned this Jul 20, 2022
@philippderdiedas
Copy link

philippderdiedas commented Jan 19, 2024

well...
how about now? (he asked nicely because does not want to fork it himself)

…uration

This allows to build 'rauc' with default TUNE_PKGARCH while only
'rauc-conf' needs to be build for MACHINE_ARCH as it contains
MACHINE-specific configuration.

Another point is that the RAUC configuration may not only by
MACHINE-specific but may also differ between images (for the same
MACHINE).

The rauc target package now RRECOMMENDS rauc-conf to pull this in by
default.

For providing your own configuration, either bbappend the existing
rauc-conf recipe, write a new one that provides 'virtual-rauc-conf' and
set PREFERRED_PROVIDER_virtual-rauc-conf or just write a custom one and
add it to your image's IMAGE_INSTALL list (or any packagegroup).

Either way, this requires migration in your rauc recipe(s)!

Signed-off-by: Enrico Jorns <[email protected]>
This recipe just provides configuration, thus there is no need to
compile anything nor do we need default (C compiler / C library)
dependencies.

Signed-off-by: Enrico Jorns <[email protected]>
@ejoerns ejoerns marked this pull request as ready for review February 8, 2024 22:36
@ejoerns
Copy link
Member Author

ejoerns commented Feb 8, 2024

Rebased onto the current master and applied some minor changes.

I was unsure about how strongly I wanted to couple rauc and rauc-conf and decided to add a RRECOMMENDS to a virtual package indirection since I assume that people not only need to want/need to append the rauc-conf recipe but likely provide their own recipes instead. E.g. for differentiating variants on the image level, this is required anyway.

Suggestions or objections welcome.

@jluebbe
Copy link
Member

jluebbe commented Feb 12, 2024

I was unsure about how strongly I wanted to couple rauc and rauc-conf and decided to add a RRECOMMENDS to a virtual package indirection since I assume that people not only need to want/need to append the rauc-conf recipe but likely provide their own recipes instead. E.g. for differentiating variants on the image level, this is required anyway.

With this change, anyone using NO_RECOMMENDATIONS in their image will have no config in their image. If you want to use per-image configs, you can easily drop the RDEPENDS via a bbappend. A comment for that case should be enough.

@ejoerns
Copy link
Member Author

ejoerns commented Feb 12, 2024

I was unsure about how strongly I wanted to couple rauc and rauc-conf and decided to add a RRECOMMENDS to a virtual package indirection since I assume that people not only need to want/need to append the rauc-conf recipe but likely provide their own recipes instead. E.g. for differentiating variants on the image level, this is required anyway.

With this change, anyone using NO_RECOMMENDATIONS in their image will have no config in their image. If you want to use per-image configs, you can easily drop the RDEPENDS via a bbappend. A comment for that case should be enough.

I wanted to avoid having to bbappend the recipe file for this case and assumed that having no config at all might be noticed.

Note that e.g. systemd pulls in systemd-conf via RRECOMMENDS only, too.

But maybe using RDEPENDS is safer for the transition in the first round, anyway.

@jluebbe
Copy link
Member

jluebbe commented Feb 12, 2024

I wanted to avoid having to bbappend the recipe file for this case and assumed that having no config at all might be noticed.

Note that e.g. systemd pulls in systemd-conf via RRECOMMENDS only, too.

OK. Then it's consistent, and it retract my criticism.

But maybe using RDEPENDS is safer for the transition in the first round, anyway.

@ejoerns ejoerns merged commit c70c8db into rauc:master Feb 29, 2024
2 checks passed
@ejoerns ejoerns deleted the topic/rauc-conf branch February 29, 2024 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement requires migration Change that requires to migrate existing integrations to new handling
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants