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

compose: If repos is unset, use global ones #5118

Closed
wants to merge 2 commits into from

Conversation

cgwalters
Copy link
Member

Part of https://gitlab.com/fedora/bootc/tracker/-/issues/32

This will simplify the hacks we have in Containerfile there.
As part of this intended UX, the repositories come from the
global set.

Signed-off-by: Colin Walters [email protected]

Part of https://gitlab.com/fedora/bootc/tracker/-/issues/32

This will simplify the hacks we have in Containerfile there.
As part of this intended UX, the repositories come from the
global set.

Signed-off-by: Colin Walters <[email protected]>
@cgwalters cgwalters changed the title Repos from host compose: If repos is unset, use global ones Oct 3, 2024
Copy link
Member

@travier travier left a comment

Choose a reason for hiding this comment

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

LGTM. Not tested. Maybe we should add a small test to make sure we'll not pick up repos from the host if we've set some to make sure we don't regress the current setup?

@cgwalters
Copy link
Member Author

I think a lot of things in the existing test suite would start to blow up if we leaked the host repos...but you're right. Testing this explicitly is clearly doable, just need to figure out where.

Hmm...I dunno. I may actually instead do a different spike on "productizing" https://gitlab.com/fedora/bootc/base-images-experimental/-/blob/main/build/dnf-installroot

@cgwalters
Copy link
Member Author

Moving this back to draft, it's not in a blocking path right now.

@jlebon
Copy link
Member

jlebon commented Oct 23, 2024

So, I opened #5136 which proposes a different semantic: if repos is missing, we don't change the reposdir (i.e. we still scan for repos sitting alongside treefiles). But we don't touch any enablement; we let the enablement set in those repo files win, which is what libdnf does by default. This seems safer and less surprising conceptually and fits nicely with the needs of the current fedora-bootc container-native flow.

If we want to support mutating the reposdir down the line, I would propose maybe setting something on the CLI instead (e.g. rpm-ostree compose image --add-reposdir ...)?

@cgwalters
Copy link
Member Author

And you're arguing then for rpm-ostree compose image --add-reposdir /etc/yum.repos.d to get the semantics I was doing here?

@jlebon
Copy link
Member

jlebon commented Oct 23, 2024

And you're arguing then for rpm-ostree compose image --add-reposdir /etc/yum.repos.d to get the semantics I was doing here?

That's one suggestion. The main argument I think is that "no repos means leave default enablement" is an easier to understand behaviour because it operates on the same axis (repos has always been about enablement).

How we implement "use host repos" if we also want that is a separate question. The CLI argument idea comes more from my estimation that this kind of behaviour is more a "how you run rpm-ostree" question rather than treefile definitions, so it seems more appropriate than a e.g. reposdir: knob there.

@cgwalters cgwalters closed this Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants