Replies: 17 comments
-
It's certainly proper to discuss it here. Rpm generally pull all or almost all configuration from the host rather than --root. During initial install there's little else it can do, for latter usage it's more questionable maybe. |
Beta Was this translation helpful? Give feedback.
-
Thank you for your comment. I wish you stated your opinion on what to do about this. But to me it eventually doesn't seem that much controversial to just remove the I now actually realized we have been doing this for Fedora Copr (for Fedora Cloud-based images) since the pre-bootstrap time. Those days host configuration affected non-bootstrapped Mock installations. For Mock it's going to be a bit of "guessing", I suppose the config file could be named whatever way -> but at least Fedora and RHEL container images use the same pattern. |
Beta Was this translation helpful? Give feedback.
-
I wouldn't mind sharing my opinion if I had one 😄 Like noted before, to rpm it's not about install langs, its about all configuration. And changing such a wide-reacing, long-standing behavior is not something I'm willing to entertain at this time. There are various ways around this but it requires help from the thing performing the installation (in Fedora, dnf) in that you need to be able to pass macro defines to it somehow. I don't know, maybe the dnf folks would be open to adding cli/config options for passing down to the rpm transaction? |
Beta Was this translation helpful? Give feedback.
-
Indeed, the current man page entry for One way to read the "all operations" part is this: all operations performed to manage the target filesystem tree. That primarily means installing, removing and querying packages. Anything else that RPM does, such as reading configuration files, therefore isn't covered by Whether or not it would make sense to let rpm do the chroot before the configuration is loaded I'm not sure either but there's a point to be made in terms of keeping things simple and the scope of |
Beta Was this translation helpful? Give feedback.
-
As for the solution itself, my understanding of the use case here is that you basically want to instruct DNF to run RPM with the stock distro configuration during |
Beta Was this translation helpful? Give feedback.
-
Yes, correct. |
Beta Was this translation helpful? Give feedback.
-
Thanks. I wonder if the |
Beta Was this translation helpful? Give feedback.
-
Note that whatever the solution, DNF would need to be updated accordingly (probably the |
Beta Was this translation helpful? Give feedback.
-
When we talk about configuration, what's meant by that? All macro definitions? Because there only seems to be an issue with As you asked for ideas; I think there's a space for a low-level, distro-specific, rpm-sub-package that would install the distro-specific configuration. If there was such an RPM, Mock could just simply tell DNF to ignore the host's configuration at the beginning (split the preparation into two steps):
The first transaction needs to be as small as possible. Small enough to Seems like the set of packages in the first transaction in Fedora
Not sure if one of those could be recycled for this purpose, instead of |
Beta Was this translation helpful? Give feedback.
-
Yeah, apologies for the confusion. Even though a lot of RPM "configuration" is done through macros, RPM does distinguish between configuration and macros, both of which can be overridden with the What I meant was macro configuration, i.e.
That's why I said you'd need to supply all the desired files yourself when using this CLI option as there's no way to just prepend/append paths to it.
This is mixing two separate issues. The one originally discussed here is about RPM respecting the config/macro files in the target root when called with Out of curiosity, though, does the second
Again, while possibly a valid proposal, this is not the right venue for discussing it, it needs to be brought up on the Fedora channels. |
Beta Was this translation helpful? Give feedback.
-
Just to illustrate better how one could use this (in order to achieve your original objective):
|
Beta Was this translation helpful? Give feedback.
-
You are right. I just wanted to clearly describe the intentions I have.
Now (I think) I understand how things work. And I believe yes. Even
Is this "macro path" hard-coded into the RPM binary, or does it depend on
This makes sense. No matter if Mock or DNF or even RPM would be responsible for overriding Is there a way to tell the chroot's macro path? Could RPM bake it
The later. The second command still uses host's configuration.
Unfortunately this is not the case. I'm afraid someone needs to design
Thank you, I think the outer RPM wrapper could set |
Beta Was this translation helpful? Give feedback.
-
I'll convert this into a Discussion, let's continue there. As soon as a concrete implementation emerges, we'll create appropriate tickets. |
Beta Was this translation helpful? Give feedback.
-
FTR, I've stumbled upon these two recent PRs that somewhat extend the scope of |
Beta Was this translation helpful? Give feedback.
-
For selective macro loading, |
Beta Was this translation helpful? Give feedback.
-
Thanks a lot, i just stuck on this for a long time. My build container |
Beta Was this translation helpful? Give feedback.
-
I think I've stumbled into this. I was trying to use a public GitHub Actions runner to create container images built from the I found that But this isn't specific to Debian either; the following is run on Fedora 39:
DNF sees no packages installed with the installroot, because the host configuration defines I suppose what I've learned is that you can't really use a host's DNF/rpm to install into a chroot if the distro/config differs too much between the host and the chroot. |
Beta Was this translation helpful? Give feedback.
-
E.g. Red Hat UBI images contain:
This though affects
dnf --installroot
usingrpm --root
:With removed macros file:
This is causing trouble with EPEL8/EPEL9 mock builds after switching to "bootstrap image" by default.
I'm curious whether this is an isolation bug in RPM or not. And if there's known guidance on what to do in such a case (should Mock try hard to work-around this, or should packages rather not require all langpacks at build-time?).
Is this a proper place to discuss this?
Beta Was this translation helpful? Give feedback.
All reactions