After bug #449776 (add support for slapd-mdb backend) openldap-2.4.40 fails during the install phase with file collisions: .. * Detected file collision(s): * * /usr/share/man/man1/mdb_copy.1.bz2 * /usr/share/man/man1/mdb_stat.1.bz2 * /usr/bin/mdb_stat * /usr/bin/mdb_copy * /usr/lib64/liblmdb.so * /usr/include/lmdb.h * * Searching all installed packages for file collisions... * * Press Ctrl-C to Stop * * dev-db/lmdb-0.9.13:0::gentoo * /usr/bin/mdb_copy * /usr/bin/mdb_stat * /usr/include/lmdb.h * /usr/lib64/liblmdb.so * /usr/share/man/man1/mdb_copy.1.bz2 * /usr/share/man/man1/mdb_stat.1.bz2 * .. Reproducible: Always Steps to Reproduce: 1. emerge dev-db/lmdb 2. emerge openldap-2.4.40 with -minimal 3. ow! Actual Results: Installaton fails with file collisions. Expected Results: No collisions; openldap and lmdb should be able to coexist. This looks difficult to solve since lmdb was extracted out of openldap, but openldap embeds the dependency and assumes it is the sole provider of the library..which it no longer is. Using lmdb by itself is very useful - in my case by postfix as much better alternative to berkdb. Maybe it is possible to make openldap depend on & use the external liblmdb ebuild when necessary? I briefly looked in configure but didn't find an easy way, but am no autoconf guru. IMHO the only other alternative would be separate library installation paths in order to hide internal libraries from the public parts. Just renaming the internal lib is not going to help due to headers/man pages etc.
Just to notice, the one embedded in openldap is more recent (0.9.14) than the separate package. I just compiled postfix against the openldap version, and it seems to work fine. Perhaps a virtual package provided by both lmdb and openldap should be the correct fix ? The other option I see would be unbundling lmdb from openldap
After looking at openldap build, it seems that the lmdb backend is statically linked to liblmdb. So without unbundling lmdb, the easiest path would be to simply stop installing liblmdb from openldap package. If the lmdb tools are needed, just add liblmdb as a dependency
(In reply to Guillaume Castagnino from comment #2) > After looking at openldap build, it seems that the lmdb backend is > statically linked to liblmdb. Thanks Guillaume - I didn't see that when I filed the bug and was wondering why it would install the library in the first place only for the backend. That's great news! > So without unbundling lmdb, the easiest path would be to simply stop > installing liblmdb from openldap package. > If the lmdb tools are needed, just add liblmdb as a dependency +1
Created attachment 387304 [details, diff] openldap-2.4.40-mdb-unbundle.patch Patch to unbundle lmdb and dynamically link against liblmdb.so It seems to work fine on my server.
Created attachment 387306 [details, diff] openldap-2.4.40.ebuild.patch Patch on the ebuild to use together with openldap-2.4.40-mdb-unbundle.patch
(In reply to Guillaume Castagnino from comment #5) > Created attachment 387306 [details, diff] [details, diff] > openldap-2.4.40.ebuild.patch > > Patch on the ebuild to use together with openldap-2.4.40-mdb-unbundle.patch Applied cleanly & built/installed against lmdb-0.9.14 with no collisions. Nice!
(In reply to Guillaume Castagnino from comment #1) > Just to notice, the one embedded in openldap is more recent (0.9.14) than > the separate package. > > I just compiled postfix against the openldap version, and it seems to work > fine. > > Perhaps a virtual package provided by both lmdb and openldap should be the > correct fix ? > The other option I see would be unbundling lmdb from openldap Before I do accept this patch, can you see if openldap safely builds and passes ALL tests with the older version that's in the tree? and/or get upstream to release a newer separate lmdb.
(In reply to Robin Johnson from comment #7) > (In reply to Guillaume Castagnino from comment #1) > > Just to notice, the one embedded in openldap is more recent (0.9.14) than > > the separate package. > > > > I just compiled postfix against the openldap version, and it seems to work > > fine. > > > > Perhaps a virtual package provided by both lmdb and openldap should be the > > correct fix ? > > The other option I see would be unbundling lmdb from openldap > Before I do accept this patch, can you see if openldap safely builds and > passes ALL tests with the older version that's in the tree? > > and/or get upstream to release a newer separate lmdb. Hi, Upstream already has released the separate version, and it’s in tree since yesterday. That’s why I tried to patch openldap to unbundle it (and the 0.9.14 version is required in the patched ebuild)
Created attachment 387334 [details] Tests and build log with patch dynamically linking to external lmdb applied By the way see attached tests. They seem to pass fine
InCVS.
InCVS
Collision is still present when trying to upgrade from net-nds/openldap-2.4.40 to net-nds/openldap-2.4.40-r2, because net-nds/openldap-2.4.40-r2 depends on dev-db/lmdb, which collides with still installed net-nds/openldap-2.4.40. $ emerge -ptv net-nds/openldap These are the packages that would be merged, in reverse order: Calculating dependencies... done! [ebuild U ] net-nds/openldap-2.4.40-r2::gentoo [2.4.40::gentoo] USE="crypt gnutls icu ipv6 odbc perl sasl slp ssl syslog tcpd -berkdb -cxx -debug -experimental -iodbc -kerberos -minimal -overlays -samba -selinux -smbkrb5passwd -static-libs" ABI_MIPS="(-n32) (-n64) (-o32)" ABI_PPC="(-32) (-64)" ABI_S390="(-32) (-64)" ABI_X86="32 (64) (-x32)" 0 KiB [ebuild N ] dev-db/lmdb-0.9.14::gentoo USE="-static-libs" 0 KiB Total: 2 packages (1 upgrade, 1 new), Size of downloads: 0 KiB * package dev-db/lmdb-0.9.14 NOT merged * * Detected file collision(s): * * /usr/bin/mdb_copy * /usr/bin/mdb_stat * /usr/bin/mdb_dump * /usr/bin/mdb_load * /usr/share/man/man1/mdb_dump.1.bz2 * /usr/share/man/man1/mdb_stat.1.bz2 * /usr/share/man/man1/mdb_load.1.bz2 * /usr/share/man/man1/mdb_copy.1.bz2 * /usr/include/lmdb.h * /usr/lib64/liblmdb.so * * Searching all installed packages for file collisions... * * Press Ctrl-C to Stop * * net-nds/openldap-2.4.40:0::gentoo * /usr/bin/mdb_copy * /usr/bin/mdb_dump * /usr/bin/mdb_load * /usr/bin/mdb_stat * /usr/include/lmdb.h * /usr/lib64/liblmdb.so * /usr/share/man/man1/mdb_copy.1.bz2 * /usr/share/man/man1/mdb_dump.1.bz2 * /usr/share/man/man1/mdb_load.1.bz2 * /usr/share/man/man1/mdb_stat.1.bz2
Created attachment 387588 [details, diff] Fix for dev-db/lmdb
Thanks arferver, that fix is applied now.