Skip to content

[FEATURE] Add support for custom bakery url #135

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

Closed
wants to merge 4 commits into from

Conversation

darkspadez
Copy link
Contributor

[FEATURE] Add support for custom bakery url

Currently hardcoded to extensions.flatcar.org/extensions/, though forks and individual bakerys would need to edit files directly to use their own.

How to use

Add --bakery <url> to bakery.sh during build time or --bakery <url> to tools/bake_flatcar_image.sh . This makes it easier for forks and other "bakerys" to specify their url instead of editing the files directly.

@@ -11,7 +11,7 @@ libroot="$(dirname "${BASH_SOURCE[0]}")"
scriptroot="$(cd "$(dirname "${BASH_SOURCE[0]}")/../"; pwd)"

bakery="flatcar/sysext-bakery"
Copy link
Member

Choose a reason for hiding this comment

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

We need to take care of this one as well, it is used to query version information of existing images from github to determine which ones to build.

@t-lo
Copy link
Member

t-lo commented Mar 31, 2025

Thank you for your contribution! May I suggest putting both bakery= and bakery_url into a separate env file which is sourced by lib/libbakery if it exists, to overwrite the defaults? This would make a fork work more flexibly as there only needs to be one change on top (the custom env file) - which is easy to rebase.

@darkspadez
Copy link
Contributor Author

@t-lo Just to confirm, switch from --bakery argument to an environment file?

@t-lo
Copy link
Member

t-lo commented Apr 1, 2025

@t-lo Just to confirm, switch from --bakery argument to an environment file?

@darkspadez Yes, an optional one. I.e. leave defaults in lib/libbakery.sh as is but source a custom env file after that if that env file exists.

This should make it easier for forks to customise the builds. I'm thinking rebases and merge conflicts here: when customisations happen in a separate file that doesn't exist in the upstream bakery, we effectively avoid merge conflicts during rebases / fast-forwards.

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