Skip to content

Conversation

@lzap
Copy link
Contributor

@lzap lzap commented Jan 8, 2026

Converts repos from JSON to YAML, I used Python to do the job and then I created a formatting script that modifies the generated YAML because it was totally unusable (keys order, quoting, GPG keys not multi-line).

There are no changes made except I took the liberty to remove empty lists (e.g. gpgkeys: []) I quickly scanned the codebase and it should not be a problem. It looks nicer this way.

Edit: I dropped the conversion script which I initially included. Shutzbot update PR linked to this PR.

@lzap lzap requested a review from a team as a code owner January 8, 2026 08:33
@schutzbot
Copy link
Contributor

schutzbot commented Jan 8, 2026

A previous version of this PR changed the images API or behaviour causing integration issues with osbuild-composer.
This is now fixed.

@supakeen
Copy link
Member

supakeen commented Jan 8, 2026

Needs conflict resolving and since #2114 landed those probably also want conversion? :)

lzap added 3 commits January 12, 2026 12:58
A simple script to reformat the repository YAML files for consistency and
better editing experience.

The script ensures:
- Consistent formatting
- Multi-line YAML format for gpgkey/gpgkeys fields (for easy pasting)
- Proper field ordering

The script is used in the prepare-source.sh script to reformat the repository
YAML files before committing them.
Switch from JSON to YAML for embedded repository files.
@lzap
Copy link
Contributor Author

lzap commented Jan 12, 2026

Sure, done.

Copy link
Member

@supakeen supakeen left a comment

Choose a reason for hiding this comment

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

Thank you, I'm OK with this. Let's see if others feel strongly about keeping it YAML (perhaps backports are annoying?).

@achilleas-k
Copy link
Member

I would personally prefer not to do this, but can be convinced otherwise if everyone else is in favour.

The downsides of keeping them in json, as far as I can tell are:

  1. Long strings with linebreaks are annoying (GPG keys).
  2. No comments.

I agree with 1, but 2 was never a problem for these files.

Now, the downsides of having them in yaml are:

  1. No standard library support in any language we use. That's fine for Go, we use yaml internally already, but for our other tooling, which is usually python scripts, that means we need an external dependency for every small script that needs to read or modify these files.
  2. Needs a whole other script to format it to make it readable.

I don't think it's worth it. We're rarely, if ever, modifying these by hand and constantly reading and modifying them in scripts. I agree that the GPG keys can get annoying to copy and paste in json but it's not frequent enough nor really that difficult to do to warrant this kind of change.

@supakeen
Copy link
Member

I would personally prefer not to do this, but can be convinced otherwise if everyone else is in favour.

The downsides of keeping them in json, as far as I can tell are:

1. Long strings with linebreaks are annoying (GPG keys).

2. No comments.

I agree with 1, but 2 was never a problem for these files.

Now, the downsides of having them in yaml are:

1. No standard library support in any language we use.  That's fine for Go, we use yaml internally already, but for our other tooling, which is usually python scripts, that means we need an external dependency for every small script that needs to read or modify these files.

2. Needs a whole other script to format it to make it readable.

I don't think it's worth it. We're rarely, if ever, modifying these by hand and constantly reading and modifying them in scripts. I agree that the GPG keys can get annoying to copy and paste in json but it's not frequent enough nor really that difficult to do to warrant this kind of change.

The benefit is mostly to users that can more easily copy these files and edit them. It might be small :)

@achilleas-k
Copy link
Member

The benefit is mostly to users that can more easily copy these files and edit them. It might be small :)

I do agree there's value there, especially with the image definition config drop-ins etc. And going back to the discussion of having repo definitions as part of the distro definitions instead of living separately is still worth doing. But that's a bigger topic that requires more careful consideration (backwards compatibility with existing documentation, the way distro versions are defined by repos, how things work in brew, osbuild-composer, etc). I think we need to consider these, but this quick format change to me is a distraction that doesn't really take into account any other future plans.

@lzap
Copy link
Contributor Author

lzap commented Jan 26, 2026

With nobody coming in with support for this, I am closing this for good.

@lzap lzap closed this Jan 26, 2026
@lzap lzap deleted the repos-yaml1 branch January 26, 2026 09:08
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.

4 participants