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

Prep patches for storing image.json in the ostree #2806

Merged
merged 6 commits into from
Apr 13, 2022

Conversation

cgwalters
Copy link
Member

build: Ensure JSON is sorted for reproducibility

Prep for sticking the rendered image.json into the ostree commit;
we want reproducibility here to avoid spurious rebuilds.


buildextend-metal: Parse image JSON, not YAML

We're centralizing the input to disk image generation as JSON.
Also, this way we'll correctly honor the defaults.


build: Move extra-kargs default into image-default.yaml

The image-default.yaml file should act as the canonical
reference for possible keys, along with their default values.


build: Checksum image JSON, not YAML

Part of canonically processing the merged JSON so we correctly
honor defaults.


build: Clean up image JSON generation, use it consistently

A few more places were parsing the image YAML, change things
so that we generate the canonicalized/flattened JSON in Python
code that can be called by the Python helpers that want it, and
call that same code as part of the shell script build preparation.


live: Move squashfs-compression def into image-default.yaml

This YAML file should have the list of all values parsed by
code.


Prep for sticking the rendered `image.json` into the ostree commit;
we want reproducibility here to avoid spurious rebuilds.
We're centralizing the input to disk image generation as JSON.
Also, this way we'll correctly honor the defaults.
The `image-default.yaml` file should act as the canonical
reference for possible keys, along with their default values.
Part of canonically processing the merged JSON so we correctly
honor defaults.
A few more places were parsing the image YAML, change things
so that we generate the canonicalized/flattened JSON in Python
code that can be called by the Python helpers that want it, and
call that same code as part of the shell script build preparation.
This YAML file should have the list of all values parsed by
code.
@cgwalters
Copy link
Member Author

Pushed the final bits here #2811

But these prep patches are just cleanups and should have a low risk of breaking anything.

Copy link
Member

@jlebon jlebon left a comment

Choose a reason for hiding this comment

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

Nice, I like the generate_image_json cleanup.

@jlebon jlebon merged commit 3102e15 into coreos:main Apr 13, 2022
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.

2 participants