Skip to content

sysext: additional repositories - #2790

Merged
supakeen merged 2 commits into
osbuild:mainfrom
supakeen:sysext-repositories
Oct 29, 2026
Merged

supakeen merged 2 commits into
osbuild:mainfrom
supakeen:sysext-repositories

Conversation

@supakeen

@supakeen supakeen commented Oct 26, 2026 •

Copy link
Copy Markdown
Member

Allow defining additional repositories that are only applied to the additional transaction that a sysext performs for package installations.

This allows for building (for example) 3rd party repository sysexts such as tailscale or others. Theoretically this isn't perfect but it should work practically in all cases I can think of.

sysexts always (even if standalone) use the "global" repositories. We might want to split out standalone into _packages and _repositories in the future but as of now there's no real reason to do so yet.


Perhaps slightly controversial but this also sets precedent and does some wiring in rpmmd.go if we want to, in the future, define repositories in the definitions in general.

We don't have any built-in definitions that create sysexts (or use any extras), external distributions (such as TeamSBC Linux and PocketBlue) do use these.

@supakeen
supakeen requested a review from a team as a code owner October 26, 2026 08:42
Comment thread pkg/distro/defs/loader.go
type packageConfDef struct {
Standalone bool `yaml:"standalone,omitempty"`
Standalone bool `yaml:"standalone,omitempty"`
Repositories []rpmmd.Repository `yaml:"repositories,omitempty"`

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.

Why not use RepoConfig?

@supakeen supakeen Oct 26, 2026 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Same format as on-disk files so it only needs to be documented once and we only provide one structure instead of two slightly different ones.

Comment thread pkg/rpmmd/repository.go
// repository is the presentation of a on-disk repository json file
type repository struct {
// Repository represents a repository entry in an on-disk repository file.
type Repository struct {

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.

Same here, why make this public rather than using RepoConfig?

@brlane-rht brlane-rht left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks pretty good, but can you split out the rpmmd change into a separate commit? It's a nice improvement that can stand on its own.

@supakeen

Copy link
Copy Markdown
Member Author

Looks pretty good, but can you split out the rpmmd change into a separate commit? It's a nice improvement that can stand on its own.

Sure! I'll do that in the morning.

@supakeen
supakeen marked this pull request as draft October 26, 2026 21:33
@supakeen
supakeen force-pushed the sysext-repositories branch from b6d0344 to f7772b7 Compare October 27, 2026 08:31
@supakeen

Copy link
Copy Markdown
Member Author

Looks pretty good, but can you split out the rpmmd change into a separate commit? It's a nice improvement that can stand on its own.

Sure! I'll do that in the morning.

Done; PR is now split into two commits, one that makes the rpmmd.Repository object public (so we can use it as a single representation everywhere) and then the rest of the code in the other commit.

@supakeen
supakeen marked this pull request as ready for review October 27, 2026 08:59
croissanne
croissanne previously approved these changes Oct 27, 2026

@croissanne croissanne 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.

lgtm, do you think we should sunset rpmmd.RepoConfig entirely?

@supakeen

Copy link
Copy Markdown
Member Author

lgtm, do you think we should sunset rpmmd.RepoConfig entirely?

Maybe, a good topic for office hours 🙂, depending on the work @achilleas-k will be doing for the flattening as well.

Comment thread README.md Resolved
Expose the `Repository` object, which is the on-disk representation of
repositories, publicly. This way other places (the YAML) can re-use the
on-disk format and parsing behavior so we have a single approach to
defining repositories; no matter where exactly they come from.

Signed-off-by: Simon de Vlieger <[email protected]>
Allow defining additional repositories that are only applied to the
additional transaction that a `sysext` performs for package
installations.

This allows for building (for example) 3rd party repository sysexts such
as `tailscale` or others. Theoretically this isn't *perfect* but it
should work practically in all cases I can think of.

`sysexts` always (even if `standalone`) use the "global" repositories.
We might want to split out standalone into `_packages` and
`_repositories` in the future but as of now there's no real reason to do
so yet.

Signed-off-by: Simon de Vlieger <[email protected]>

@brlane-rht brlane-rht left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good!

@supakeen
supakeen enabled auto-merge October 28, 2026 05:22
@supakeen
supakeen added this pull request to the merge queue Oct 29, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 29, 2026
@supakeen
supakeen added this pull request to the merge queue Oct 29, 2026
Merged via the queue into osbuild:main with commit cafac43 Oct 29, 2026
51 of 55 checks passed
@supakeen
supakeen deleted the sysext-repositories branch October 29, 2026 12:37
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