-
Notifications
You must be signed in to change notification settings - Fork 510
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
simplify early-boot-config dependencies #3890
Conversation
Use RPM's shorthand syntax for subpackages names that are a suffix of the main package's name. Signed-off-by: Ben Cressey <[email protected]>
Some form of early-boot-config is required for the OS to function, so add that dependency to the release package, which collects the other mandatory dependencies. Switch to boolean dependencies in the early-boot-config package, so that the expected providers are installed for the variant's platform. Remove the explicit dependency from all variant definitions, as an exercise in boilerplate reduction. Signed-off-by: Ben Cressey <[email protected]>
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.
Changes look correct to me. My only concern is that it's adding back in some variant-aware conditional compilation to packages/
, but this does seem like the logical end of the packaging setup we landed on with early-boot-config-${PLATFORM}
.
Just reasoning through this for my own sake, in full-OOTB world it seems like we'll want the early-boot-config
package to just install the binary and data-providers.d
directory (and maybe the local file providers?). And then OOTBuilders should package in any data providers they want to use themselves. Does that sound right to you @bcressey ?
It's admittedly variant-aware, but the appeal of this approach is that the RPMs are actually not conditionally compiled: they are always built the same way, but with a boolean dependency that only triggers if a condition is met at install time. We do still have the one In concrete terms, if you inspect the package you can see that all the requirements are present on the same artifact:
Yes, although the behavior change from PR is that if they name their OOTB variant "aws-*" then it will now automatically pull in The OOTBuilder would also need to avoid installing the |
Got it, thanks for the explanation!
Yeah agreed, I think this is really nice, although it feels a bit "magic". We should probably make a note somewhere in a future OOTB guide that the variant name does matter (i.e. it changes behavior) in some ways. |
Issue number:
N/A
Description of changes:
Take advantage of the new metadata provides to simplify the early-boot-config dependencies.
Testing done:
Build log for
aws-dev
:Build log for
metal-dev
:Build log for
vmware-dev
:Terms of contribution:
By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.