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: prepare support for locating the config in /usr or /run #350

Open
wants to merge 1 commit into
base: kirkstone
Choose a base branch
from

Conversation

a3f
Copy link
Contributor

@a3f a3f commented Nov 14, 2024

rauc: prepare support for locating the config in /usr or /run

RAUC PR #15571 is already merged into master and extends RAUC to
look up its system.conf in /etc/rauc, /run/rauc or /usr/lib/rauc
in that order.

The RAUC recipe understandably hardcodes the assumption that the
system.conf must be supplied and that it must be located in /etc/ra

To make the recipe more useful with RAUC with #1557 merged, let's
add RAUC_CONF_DIR, which defaults to /etc/rauc, but can be set by
the user to be /usr/lib/rauc instead for hermetic-usr use cases.

This PR does not break anything for current RAUC versions, so it
should be fine to merge it independent of the update to a future
RAUC release that integrates the upstream PR.

@a3f
Copy link
Contributor Author

a3f commented Nov 14, 2024

This PR can't be trivially rebased onto master and my BSP still uses Kirkstone. To avoid churn, I'd like to reach agreement first whether this approach is ok before rebasing.

recipes-core/rauc/files/system.conf Outdated Show resolved Hide resolved
README.rst Outdated Show resolved Hide resolved
recipes-core/rauc/rauc-target.inc Outdated Show resolved Hide resolved
@jluebbe jluebbe requested a review from ejoerns November 15, 2024 14:48
@jluebbe jluebbe assigned ejoerns and unassigned a3f Nov 15, 2024
@ejoerns ejoerns added the kirkstone kirkstone release-related label Nov 15, 2024
Copy link
Member

@ejoerns ejoerns left a comment

Choose a reason for hiding this comment

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

I am not convinced if it is worth changing this for kirkstone.
I assume no one still sitting on a kirkstone-based BSP will transition to a different config directory.

For scarthgap however, it might make sense to support it.
However, since scarthgap we also use a separate rauc-conf.bb recipe and it should be quite easy to just write a custom one that does not install the system.conf.

For the path my favorite choice would be to just propose /usr/lib/rauc/system.conf as the default in master and add a note to the migration section.
People then can still use a different path in their custom rauc-conf recipes if required.

If it makes things easier, I would, however, be open to taking the minimalistic RAUC_CONF variable approach for both master and scarthgap.

@a3f
Copy link
Contributor Author

a3f commented Nov 15, 2024

I am not convinced if it is worth changing this for kirkstone.

It doesn't introduce any functional change on its own, just makes it easier for users to change the default if needed.

I assume no one still sitting on a kirkstone-based BSP will transition to a different config directory.

I will :-)

[I]t should be quite easy to just write a custom one that does not install the system.conf.

I think it would still be good to have a variable that can just be overridden to get the old behavior back (if we make it the default) or to opt-in to hermetic-usr.

For the path my favorite choice would be to just propose /usr/lib/rauc/system.conf as the default in master and add a note to the migration section.

Yes, that sounds sensible for master.

If it makes things easier, I would, however, be open to taking the minimalistic RAUC_CONF variable approach for both master and scarthgap.

How about we use that minimalistic approach in all of kirkstone, scarthgap and master and additionally change master's default..?

@ejoerns
Copy link
Member

ejoerns commented Nov 15, 2024

[I]t should be quite easy to just write a custom one that does not install the system.conf.

I think it would still be good to have a variable that can just be overridden to get the old behavior back (if we make it the default) or to opt-in to hermetic-usr.

My comment was about not installing system.conf at all. I guess we won't make this the default.

If it makes things easier, I would, however, be open to taking the minimalistic RAUC_CONF variable approach for both master and scarthgap.

How about we use that minimalistic approach in all of kirkstone, scarthgap and master and additionally change master's default..?

Yes, sounds like a plan.

RAUC PR #1557[1] is already merged into master and extends RAUC to
look up its system.conf in /etc/rauc, /run/rauc or /usr/lib/rauc
in that order.

The RAUC recipe understandably hardcodes the assumption that the
system.conf must be supplied and that it must be located in /etc/rauc.

To make the recipe more useful with RAUC with #1557 merged, let's
add RAUC_CONF_DIR, which defaults to /etc/rauc, but can be set by
the user to be /usr/lib/rauc instead for hermetic-usr use cases.

This PR does not break anything for current RAUC versions, so it
should be fine to merge it independent of the update to a future
RAUC release that integrates the upstream PR.

[1]: rauc/rauc#1557

Signed-off-by: Ahmad Fatoum <[email protected]>
@a3f
Copy link
Contributor Author

a3f commented Nov 15, 2024

My comment was about not installing system.conf at all. I guess we won't make this the default.

Ok, I will just drop that.

Yes, sounds like a plan.

Well, the PR for the first of the bunch is now ready to merge :-)

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

Successfully merging this pull request may close these issues.

3 participants