Skip to content

Conversation

@bcressey
Copy link
Contributor

Issue number:
Related: bottlerocket-os/bottlerocket#4680

Description of changes:
The property we would like is that, given the same input, rpm2img and prairiedog should produce the same bootconfig output.

On a running system, prairiedog handles reading bootconfig inputs from the settings API, by way of its TOML config file, which causes any existing ordering to be lost. However, prairiedog can sort its output; if rpm2img also sorts its output, then we can achieve the desired outcome.

Reject any complex bootconfig files that would be broken by sorting, then sort output lines so they appear in a consistent order.

Testing done:
See bottlerocket-os/bottlerocket-core-kit#735 for the prairiedog which has the prairiedog side of this change.

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.

The property we would like is that, given the same input, `rpm2img`
and `prairiedog` should produce the same output.

On a running system, `prairiedog` handles reading bootconfig inputs
from the settings API, by way of its TOML config file, which causes
any existing ordering to be lost. However, `prairiedog` can sort its
output; if `rpm2img` also sorts its output, then we can achieve the
desired outcome.

Reject any complex bootconfig files that would be broken by sorting,
then sort output lines so they appear in a consistent order.

Signed-off-by: Ben Cressey <[email protected]>
@cbgbt cbgbt merged commit 3d04369 into bottlerocket-os:develop Nov 11, 2025
5 of 6 checks passed
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.

3 participants