Re: [Rpm-maint] [rpm-software-management/rpm] What's the scope of --root (supposed to be)? (Discussion #2735)
I think I've stumbled into this. I was trying to use a public GitHub Actions runner to create container images built from the `ubi-micro` images, which don't have `dnf` installed within. I found that `dnf --installroot=... install` failed because the PGP keys it wanted weren't found in the RPM database. If I worked around that problem then I found that the the container's RPM database in `/var/lib/rpm` was not being updated by DNF. Instead, a new RPM database was created in `/home/runner/.rpmdb`! The ultimate cause of both problems was a [a Debian patch](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=551669) which defines %_dbpath as `~/.rpmdb`. But this isn't specific to Debian either; the following is run on Fedora 39: ``` $ ctr=$(buildah from registry.access.redhat.com/ubi9/ubi-minimal) $ mnt=$(buildah mount $ctr) $ dnf --noplugins --releasever=9 --installroot="$mnt" list --installed | wc -l 0 $ chroot "$mnt" rpm -qa | wc -l 103 ``` DNF sees no packages installed with the installroot, because the host configuration defines `%_dbpath` as `/usr/lib/sysimage/rpm`, again different from how it's defined in the `ubi-micro` container image. 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. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/discussions/2735#discussioncomment-9174869 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] What's the scope of --root (supposed to be)? (Discussion #2735)
Thanks a lot, i just stuck on this for a long time. My build container `/etc/rpm/macros.image-language-conf`=`%_install_langs en_US.UTF-8`, The ISO i built with this container, it's Anaconda INSTALLATION screen only support English. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/discussions/2735#discussioncomment-8674403 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] What's the scope of --root (supposed to be)? (Discussion #2735)
`--macros` is problematic because it requires rewriting the entire path, most of which is fairly critical to normal operation. Basically rpm must always initialize itself with the macros from the same version, otherwise there's weird stuff can happen. Which means, rpm from the host must initialize with the macros from the host. For selective macro loading, --load=/some/path is much better alternative as this doesn't disrupt the normal macro path. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/discussions/2735#discussioncomment-7487779 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] What's the scope of --root (supposed to be)? (Discussion #2735)
FTR, I've stumbled upon these two recent PRs that somewhat extend the scope of `--root` and may act as some kind of precedent if we choose to involve macro configuration, too: * #2582 * #2503 -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/discussions/2735#discussioncomment-7382408 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint