-
Notifications
You must be signed in to change notification settings - Fork 197
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
rpm-ostree does not read /etc/dnf/vars
#3241
Comments
Looking at the URL in the rpm-ostree error:
It looks like |
I found rpm-software-management/libdnf#801 which seems related but should have been fixed long ago. |
not that running dnf on the same system seems to pull fine the metadata, it fails at the download stage but that's expected |
To confirm, is this part of the base OSTree compose or did you add it? In case of the latter, try to bake it into the OSTree compose instead. At |
I did not add this file, I've discovered it when looking around once I encountered the issue :) |
/etc/dnf/vars
Ah, TIL there's now
OK I was able to quickly reproduce this on a FCOS test system by editing |
(Also TIL, C9S does not have a minimal ISO, only a 7.5GB one that I'm downloading now at 500k/s from some random mirror... 😢 ) |
I tried to get rid of the |
Any updates to this issue? |
While looking into this, I was surprised to notice that setting variables through
|
This seems to be a weird side-effect of libdnf
This happens because rpm-ostree does: rpm-ostree/src/libpriv/rpmostree-core.cxx Lines 559 to 560 in f8fb692
And internally libdnf does:
|
Hmm, but we should AFAICS always be passing the target deployment directory as Main path should be
Can you add some debug prints in your test setup? |
For rpm-ostree/src/daemon/rpmostreed-transaction-types.cxx Lines 2260 to 2264 in cf7af44
For |
For
I don't know how much of I tried tweaking
|
Ahhh. Hmm. So the backstory here is originally I was trying to keep the rpm-ostree changes "hermetic", i.e. we always construct the new root without pulling forward state from the current root. Very specifically, the new root should not use the current rpmdb for example. That would break in a rebase scenario. It would also cause "state leakage" in a live apply. But, obviously for things like So...I think what we want is |
An interesting detail is that
It is unclear to me why they behave in different ways with respect to
I'll move this discussion upstream to see whether they prefer tweaking the current behavior (to avoid Aside from that, I think that for the moment we can hack around this bug with a |
Are you taking this? |
libdnf ticket is at rpm-software-management/libdnf#1503. Yes, I'll venture into assembling the hacked workaround on our side tomorrow. |
#3652 is the workaround for this, at least partially. It seems to fix But
I do fear that this is due to the procfs-relative path resolution, which teleports the lookup somewhere else in the hierarchy. |
Nothing stops us from shipping a patched libdnf short term, we'd just need to fork the repo to e.g. https://github.com/coreos/libdnf or so. |
I think I had to do my own workaround for vars in PackageKit for a different reason. Maybe that could help here? This is what I did in PackageKit: PackageKit/PackageKit@ed73aa6 |
Thanks for the reference, offhand it does seem like changing the semantics of this in libdnf might break other things like PackageKit and we'd need to keep that in mind. (Tangentially related to all this, what I think we want is to avoid string paths entirely and have |
@Conan-Kudo thanks for the hint! |
#3652 (already merged) now carries a workaround for both Once the |
This drops the internal prefixing logic for vars directories, thus avoiding the prepended `install_root` path prefix on all entries. It also results in aligning the behaviors of `dnf_context_set_vars_dir()` and `dnf_context_set_repos_dir()`. Existing consumers in the wild are not really expecting this kind of prefixing to happen internally. Additionally, developers seem to naturally assume that the lookalike APIs for repos-dir and vars-dir behave in the same way. Ref: coreos/rpm-ostree#3241 Ref: https://github.com/PackageKit/PackageKit/pull/369/files#r863937752 Closes: rpm-software-management#1503
in scos testing as workaround See: - https://bugzilla.redhat.com/show_bug.cgi?id=2113042 - coreos/rpm-ostree#3241
in scos testing as workaround See: - https://bugzilla.redhat.com/show_bug.cgi?id=2113042 - coreos/rpm-ostree#3241
Host system details
Using osbuild we've built an ostree system based on CS9.
Expected vs actual behavior
Expected:
Steps to reproduce it
Produce a CS9-based ostree image/system.
The issue is the way the URL to the metalink is generated.
Currently, it hits:
but we need to it instead:
The URL is defined as:
$stream
should be replaced by9-stream
but is only replaced by9
.$stream
is defined in:It looks like
rpm-ostree
is not getting that value/information.Is this analysis correct?
The text was updated successfully, but these errors were encountered: