Skip to content

distro: tweak the packagesets.Loader() interface (HMS-5820) - #1291

Merged
supakeen merged 1 commit into
osbuild:mainfrom
mvo5:yaml-loader-load-tweaks
Mar 6, 2025
Merged

supakeen merged 1 commit into
osbuild:mainfrom
mvo5:yaml-loader-load-tweaks

Conversation

@mvo5

@mvo5 mvo5 commented Mar 6, 2025 •

Copy link
Copy Markdown
Contributor

The current packagesets.Loader() takes a single imagetype argument to determine what packagesets to load from YAML.

This generally works great but its a challenge for image types like the anaconda installer where we need a different package set for the iso and the os. In fedora we workaround this by re-using the minimal-raw package set for the anaconda installers "os" package set. However in Centos/RHEL this is less straightforward so having the ability to "override" the pkgset name is required.

Another trivial split out from #1283

JIRA: HMS-5820

The current `packagesets.Loader()` takes a single imagetype
argument to determine what packagesets to load from YAML.

This generally works great but its a challenge for image types
like the anaconda installer where we need a different package
set for the iso and the os. In fedora we workaround this by
re-using the minimal-raw package set for the anaconda installers
"os" package set. However in Centos/RHEL this is less straightforward
so having the ability to "override" the pkgset name is required.
@mvo5
mvo5 requested a review from a team as a code owner March 6, 2025 09:01

@supakeen supakeen left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice. This could lead to decoupling package set names from image types perhaps? That'd remove a bunch of not-really-necessary definitions in the YAML for Fedora as well.

@achilleas-k achilleas-k left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Approving, but I'd like to consider an alternative. I think that it might be simpler and more flexible to have multiple package sets per image type, keyed by some keywords we define globally like "payload" and "installer".

I could be wrong about this being simpler though. If we only have a couple of these cases, then the solution in this PR is preferable.

@supakeen
supakeen added this pull request to the merge queue Mar 6, 2025
Merged via the queue into osbuild:main with commit c9cd510 Mar 6, 2025
@ochosi

ochosi commented Mar 31, 2025

Copy link
Copy Markdown
Contributor

/jira-epic HMS-5284

@schutzbot schutzbot changed the title distro: tweak the packagesets.Loader() interface distro: tweak the packagesets.Loader() interface (HMS-5820) Mar 31, 2025
mvo5 added a commit to mvo5/images that referenced this pull request May 8, 2025
This commit changes the defs.PackageSet loader to return
the full map of all static package sets defined for the
pipelines. This is needed when we want to move all of
the image types into YAML. We currently define in code
what image types load from os, container or installer
pipelines but that does not translate to pure YAML.

Cleanup of osbuild#1291
mvo5 added a commit to mvo5/images that referenced this pull request May 8, 2025
This commit changes the defs.PackageSet loader to return
the full map of all static package sets defined for the
pipelines. This is needed when we want to move all of
the image types into YAML. We currently define in code
what image types load from os, container or installer
pipelines but that does not translate to pure YAML.

Cleanup of osbuild#1291
mvo5 added a commit to mvo5/images that referenced this pull request May 9, 2025
This commit changes the defs.PackageSet loader to return
the full map of all static package sets defined for the
pipelines. This is needed when we want to move all of
the image types into YAML. We currently define in code
what image types load from os, container or installer
pipelines but that does not translate to pure YAML.

Cleanup of osbuild#1291
mvo5 added a commit to mvo5/images that referenced this pull request May 12, 2025
This commit changes the defs.PackageSet loader to return
the full map of all static package sets defined for the
pipelines. This is needed when we want to move all of
the image types into YAML. We currently define in code
what image types load from os, container or installer
pipelines but that does not translate to pure YAML.

This maps "pkgsKey" to their package sets. The
map key here is a string that can either be:
- "os": packages for the os
- "installer": packages for the installer
- "container": extra package into an iot container

- "blueprint": unused AFAICT
- "build": unused AFAICT
Note that this does not directly maps to pipeline names
but we should look into making it so.

Cleanup of osbuild#1291
github-merge-queue Bot pushed a commit that referenced this pull request May 13, 2025
This commit changes the defs.PackageSet loader to return
the full map of all static package sets defined for the
pipelines. This is needed when we want to move all of
the image types into YAML. We currently define in code
what image types load from os, container or installer
pipelines but that does not translate to pure YAML.

This maps "pkgsKey" to their package sets. The
map key here is a string that can either be:
- "os": packages for the os
- "installer": packages for the installer
- "container": extra package into an iot container

- "blueprint": unused AFAICT
- "build": unused AFAICT
Note that this does not directly maps to pipeline names
but we should look into making it so.

Cleanup of #1291
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