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
On Tue, 12 Feb 2019, Brian Reichert wrote:
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.
I'm no expert on binary formats, but I think openldap-ltb-2.4.47-1.el7.x86_64.rpm is broken. Try this against a base rpm, e.g.,
rpm -q --requires -p ./cpio-2.11-27.el7.x86_64.rpm | od -c warning: ./cpio-2.11-27.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY 0000000 / b i n / s h \n / b i n / s h \n 0000020 / s b i n / i n s t a l l - i n 0000040 f o \n / s b i n / i n s t a l l 0000060 - i n f o \n l i b c . s o . 6 ( 0000100 ) ( 6 4 b i t ) \n l i b c . s o
Then run the same thing against the openldap-ltb package:
warning: ./openldap-ltb-2.4.47-1.el7.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 6d45bfc5: NOKEY 0000000 / b i n / b a s h \n / b i n / s 0000020 h \n / b i n / s h \n / b i n / s * 0000060 h \n / s b i n / l d c o n f i g 0000100 \n b e r k e l e y d b - l t b
That asterick where 0000040 (and its contents) should be is worrisome to me. To my eye, something is amiss.
On Tue, Feb 12, 2019 at 01:47:43PM -0800, Paul Heinlein wrote:
That asterick where 0000040 (and its contents) should be is worrisome to me. To my eye, something is amiss.
In the 'hexdump' and 'od' utilities, the '*' means a duplicate line was suppressed. From od(1):
-v, --output-duplicates do not use * to mark line suppression
To wit:
$ rpm -q -requires -p openldap-ltb-2.4.47-1.el7.x86_64.rpm | od -c | head -5 warning: openldap-ltb-2.4.47-1.el7.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 6d45bfc5: NOKEY 0000000 / b i n / b a s h \n / b i n / s 0000020 h \n / b i n / s h \n / b i n / s * 0000060 h \n / s b i n / l d c o n f i g 0000100 \n b e r k e l e y d b - l t b $ rpm -q -requires -p openldap-ltb-2.4.47-1.el7.x86_64.rpm | od -cv | head -5 warning: openldap-ltb-2.4.47-1.el7.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 6d45bfc5: NOKEY 0000000 / b i n / b a s h \n / b i n / s 0000020 h \n / b i n / s h \n / b i n / s 0000040 h \n / b i n / s h \n / b i n / s 0000060 h \n / s b i n / l d c o n f i g 0000100 \n b e r k e l e y d b - l t b
And indeed, for whatever reason, openldap-ltb lists '/bin/sh' several times:
$ rpm -q -requires -p openldap-ltb-2.4.47-1.el7.x86_64.rpm | head -5 warning: openldap-ltb-2.4.47-1.el7.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 6d45bfc5: NOKEY /bin/bash /bin/sh /bin/sh /bin/sh /bin/sh
-- Paul Heinlein heinlein@madboa.com 45?38' N, 122?6' W _______________________________________________ CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos
I'm circling back to this topic:
http://centos.1050465.n5.nabble.com/CentOS-weird-RPM-dependency-error-bin-sh...
On Tue, Feb 12, 2019 at 03:56:49PM -0500, Brian Reichert wrote:
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
I've asked the LTB folks about the symptoms I report, and they can't find anything mysterious going on.
They directed me to their SPEC file:
https://github.com/ltb-project/openldap-rpm/blob/master/SPECS/openldap-ltb.s...
Further, I tried a rebuild of their source RPM on my CentOS 7.6.1810 host, and the resulting RPM yielded the same symptoms:
http://ltb-project.org/archives/openldap-ltb-2.4.47-1.el7.src.rpm
I can directly install the related RPMs on a CentOS 7.6.1810 host; it seems specific to my effort to building a private RPM database.
I don't see any updates to the 'rpm' package itself that might address what I'm seeing.