diff options
author | Sam James <sam@gentoo.org> | 2023-02-10 01:02:06 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2023-02-10 01:05:03 +0000 |
commit | c035192e22ba5714ccc15672f335e9b97aaeb568 (patch) | |
tree | d23574859ec7f75b995f5449a4ee336147184118 /net-nds/openldap | |
parent | dev-db/lmdb: add 0.9.30 (diff) | |
download | gentoo-c035192e22ba5714ccc15672f335e9b97aaeb568.tar.gz gentoo-c035192e22ba5714ccc15672f335e9b97aaeb568.tar.bz2 gentoo-c035192e22ba5714ccc15672f335e9b97aaeb568.zip |
net-nds/openldap: fix lmdb version, add version check
We must use at least the version of lmdb bundled with OpenLDAP.
Bug: https://bugs.gentoo.org/588792
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'net-nds/openldap')
-rw-r--r-- | net-nds/openldap/openldap-2.6.4-r1.ebuild (renamed from net-nds/openldap/openldap-2.6.4.ebuild) | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/net-nds/openldap/openldap-2.6.4.ebuild b/net-nds/openldap/openldap-2.6.4-r1.ebuild index 3cd2bdeb87d7..56617abc986c 100644 --- a/net-nds/openldap/openldap-2.6.4.ebuild +++ b/net-nds/openldap/openldap-2.6.4-r1.ebuild @@ -40,6 +40,7 @@ REQUIRED_USE="cxx? ( sasl ) ?? ( test minimal ) kerberos? ( ?? ( kinit smbkrb5passwd ) )" +SYSTEM_LMDB_VER=0.9.30 # openssl is needed to generate lanman-passwords required by samba COMMON_DEPEND=" kernel_linux? ( sys-apps/util-linux ) @@ -56,7 +57,7 @@ COMMON_DEPEND=" !minimal? ( dev-libs/libltdl sys-fs/e2fsprogs - >=dev-db/lmdb-0.9.18:= + >=dev-db/lmdb-${SYSTEM_LMDB_VER}:= argon2? ( app-crypt/argon2:= ) crypt? ( virtual/libcrypt:= ) tcpd? ( sys-apps/tcp-wrappers ) @@ -332,6 +333,20 @@ pkg_setup() { } src_prepare() { + # The system copy of dev-db/lmdb must match the version that this copy + # of OpenLDAP shipped with! See bug #588792. + # + # Fish out MDB_VERSION_MAJOR/MDB_VERSION_MINOR/MDB_VERSION_PATCH from + # the bundled lmdb's header to find out the version. + local bundled_lmdb_version=$(sed -En '/^#define MDB_VERSION_(MAJOR|MINOR|PATCH)(\s+)?/{s/[^0-9.]//gp}' libraries/liblmdb/lmdb.h || die) + bundled_lmdb_version=$(printf "%s." ${bundled_lmdb_version}) + + if [[ ${SYSTEM_LMDB_VER}. != ${bundled_lmdb_version} ]] ; then + eerror "Source lmdb version: ${bundled_lmdb_version}" + eerror "Ebuild lmdb version: ${SYSTEM_LMDB_VER}" + die "Ebuild needs to update SYSTEM_LMDB_VER!" + fi + rm -r libraries/liblmdb || die 'could not removed bundled lmdb directory' local filename |