(This is a re-send; my first attempt was a day ago, but I did not see this come through. I may not have been subscribed to this list at the time, which may have impacted things. So, I do apologize if you eventually get a dup.)
First off, I have to admit that I'm uncertain if this is the appropriate forum; I'd be happy for suggestions about where else to look.
I'm doing this work on a stock install of CentOS-7-x86_64-Minimal-1810.iso, with no updates.
I'm trying to create an RPM database from a custom set of RPMs.
One RPM ('openldap-ltb' from the LDAP Tool Box project (ltb-project.org) has a dependency on '/bin/sh'. The bash RPM is demonstratedly present, yet the the 'rpm' utility thinks this dependency is not met.
I'm open to any advice as to how to progress.
It pretty easy to demonstrate what's going wrong, rather than trying to describe it.
Straightforward to reproduce:
Here, I collect the misc bits from the net:
$ wget --quiet http://mirrors.mit.edu/centos/7/isos/x86_64/CentOS-7-x86_64-Minimal-1810.iso $ wget --quiet http://mirrors.mit.edu/centos/7/os/x86_64/Packages/libtool-ltdl-2.4.2-22.el7... $ wget --quiet https://ltb-project.org/archives/berkeleydb-ltb-4.6.21.NC-4.el7.patch4.x86_6... $ wget --quiet https://ltb-project.org/archives/openldap-ltb-2.4.47-1.el7.x86_64.rpm
Now, I try to make an RPM database of these packages. The last step fails with an unmet dependency:
$ sudo mount ~/CentOS-7-x86_64-Minimal-1810.iso -r -t iso9660 -o loop /mnt $ mkdir -p ~/local_rpm_db $ rpm --initdb --dbpath ~/local_rpm_db $ rpm --justdb --ignoresize --dbpath ~/local_rpm_db -Uvh /mnt/Packages/*.rpm *.rpm warning: /mnt/cdrom/Packages/acl-2.2.51-14.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY warning: berkeleydb-ltb-4.6.21.NC-4.el7.patch4.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 6d45bfc5: NOKEY error: Failed dependencies: /bin/sh is needed by openldap-ltb-2.4.47-1.el7.x86_64
Which is weird, as the 'bash' RPM is clearly part of the set, and 'provides' the needed feature:
$ rpm -q -provides -p /mnt/Packages/bash-4.2.46-31.el7.x86_64.rpm | egrep 'sh$' /bin/bash /bin/sh
Further, it's not among the list of files in the payload of the RPM:
$ rpm -q -l -p /mnt/Packages/bash-4.2.46-31.el7.x86_64.rpm | egrep 'sh$' /usr/bin/bash /usr/bin/sh
These tactics did work with the related bits for CentOS 6.
Here are some details of my environment; I'm happy to provide more, if anyone has any questions:
$ cat /etc/redhat-release CentOS Linux release 7.6.1810 (Core) $ rpm -qf /usr/bin/rpm rpm-4.11.3-35.el7.x86_64