Diff openldap-2.5.16 with a openldap-2.6.3-r7

/usr/portage/net-nds/openldap/openldap-2.6.3-r7.ebuild 2023-10-09 14:52:34.724368482 +0300
17 17
DESCRIPTION="LDAP suite of application and development tools"
18 18
HOMEPAGE="https://www.openldap.org/"
19 19
SRC_URI="
20
	https://gitlab.com/openldap/${PN}/-/archive/OPENLDAP_REL_ENG_${MY_PV}/${PN}-OPENLDAP_REL_ENG_${MY_PV}.tar.bz2
20
	https://gitlab.com/openldap/${PN}/-/archive/OPENLDAP_REL_ENG_${MY_PV}/${PN}-OPENLDAP_REL_ENG_${MY_PV}.tar.gz
21 21
	mirror://gentoo/${BIS_P}
22 22
"
23 23
S="${WORKDIR}"/${PN}-OPENLDAP_REL_ENG_${MY_PV}
......
25 25
LICENSE="OPENLDAP GPL-2"
26 26
# Subslot added for bug #835654
27 27
SLOT="0/$(ver_cut 1-2)"
28
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
28
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~mips ~ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux"
29 29

  
30 30
IUSE_DAEMON="argon2 +cleartext crypt experimental minimal samba tcpd"
31 31
IUSE_OVERLAY="overlays perl autoca"
......
35 35
IUSE="systemd ${IUSE_DAEMON} ${IUSE_BACKEND} ${IUSE_OVERLAY} ${IUSE_OPTIONAL} ${IUSE_CONTRIB}"
36 36
REQUIRED_USE="cxx? ( sasl )
37 37
	pbkdf2? ( ssl )
38
	test? ( cleartext debug sasl )
38
	test? ( cleartext sasl )
39 39
	autoca? ( !gnutls )
40 40
	?? ( test minimal )
41 41
	kerberos? ( ?? ( kinit smbkrb5passwd ) )"
42 42
RESTRICT="!test? ( test )"
43 43

  
44
SYSTEM_LMDB_VER=0.9.31
45 44
# openssl is needed to generate lanman-passwords required by samba
46 45
COMMON_DEPEND="
47 46
	kernel_linux? ( sys-apps/util-linux )
......
58 57
	!minimal? (
59 58
		dev-libs/libltdl
60 59
		sys-fs/e2fsprogs
61
		>=dev-db/lmdb-${SYSTEM_LMDB_VER}:=
60
		>=dev-db/lmdb-0.9.18:=
62 61
		argon2? ( app-crypt/argon2:= )
63 62
		crypt? ( virtual/libcrypt:= )
64 63
		tcpd? ( sys-apps/tcp-wrappers )
......
140 139
	"${FILESDIR}"/${PN}-2.6.1-system-mdb.patch
141 140
	"${FILESDIR}"/${PN}-2.6.1-cloak.patch
142 141
	"${FILESDIR}"/${PN}-2.6.1-flags.patch
142
	"${FILESDIR}"/${PN}-2.6.1-fix-missing-mapping.patch
143
	"${FILESDIR}"/${PN}-2.6.1-fix-bashism-configure.patch
144
	"${FILESDIR}"/${PN}-2.6.3-clang16.patch
143 145
)
144 146

  
145 147
openldap_filecount() {
......
234 236
		# This will not cover detection of cn=Config based configuration, but
235 237
		# it's hopefully good enough.
236 238
		if grep -sq '^backend.*shell' "${EROOT}"/etc/openldap/slapd.conf; then
237
			eerror "    OpenLDAP >= 2.6.x has dropped support for Shell backend."
239
			eerror "    OpenLDAP >= 2.5.x has dropped support for Shell backend."
238 240
			eerror "	You will need to migrate per upstream's migration notes"
239 241
			eerror "	at https://www.openldap.org/doc/admin25/appendix-upgrading.html."
240 242
			eerror "	Your existing database will not be accessible until it is"
......
332 334
}
333 335

  
334 336
src_prepare() {
335
	# The system copy of dev-db/lmdb must match the version that this copy
336
	# of OpenLDAP shipped with! See bug #588792.
337
	#
338
	# Fish out MDB_VERSION_MAJOR/MDB_VERSION_MINOR/MDB_VERSION_PATCH from
339
	# the bundled lmdb's header to find out the version.
340
	local bundled_lmdb_version=$(sed -En '/^#define MDB_VERSION_(MAJOR|MINOR|PATCH)(\s+)?/{s/[^0-9.]//gp}' libraries/liblmdb/lmdb.h || die)
341
	printf -v bundled_lmdb_version "%s." ${bundled_lmdb_version}
342

  
343
	if [[ ${SYSTEM_LMDB_VER}. != ${bundled_lmdb_version} ]] ; then
344
		eerror "Source lmdb version: ${bundled_lmdb_version}"
345
		eerror "Ebuild lmdb version: ${SYSTEM_LMDB_VER}"
346
		die "Ebuild needs to update SYSTEM_LMDB_VER!"
347
	fi
348

  
349 337
	rm -r libraries/liblmdb || die 'could not removed bundled lmdb directory'
350 338

  
351
	local filename
352 339
	for filename in doc/drafts/draft-ietf-ldapext-acl-model-xx.txt; do
353
		iconv -f iso-8859-1 -t utf-8 "${filename}" > "${filename}.utf8"
354
		mv "${filename}.utf8" "${filename}"
340
		iconv -f iso-8859-1 -t utf-8 "$filename" > "$filename.utf8"
341
		mv "$filename.utf8" "$filename"
355 342
	done
356 343

  
357 344
	default
......
366 353
	einfo "Making sure upstream build strip does not do stripping too early"
367 354
	sed -i.orig \
368 355
		-e '/^STRIP/s,-s,,g' \
369
		top.mk || die "Failed to remove too early stripping"
356
		top.mk || die "Failed to remove to early stripping"
370 357
	popd &>/dev/null || die
371 358

  
372
	# Fails with OpenSSL 3, bug #848894
373
	# https://bugs.openldap.org/show_bug.cgi?id=10009
374
	rm tests/scripts/test076-authid-rewrite || die
375

  
376 359
	eautoreconf
377 360
	multilib_copy_sources
378 361
}
......
385 368
	emake \
386 369
		LDAP_BUILD="${BUILD_DIR}" prefix="${EPREFIX}/usr" \
387 370
		CC="${CC}" libexecdir="${EPREFIX}/usr/$(get_libdir)/openldap" \
388
		"${target}"
371
		"$target"
389 372
	popd &>/dev/null || die
390 373
}
391 374

  
......
405 388
		--without-fetch
406 389
	)
407 390

  
408
	if use experimental ; then
409
		# connectionless ldap per bug #342439
410
		# connectionless is a unsupported feature according to Howard Chu
411
		# see https://bugs.openldap.org/show_bug.cgi?id=9739
412
		# (see also bug #892009)
413
		append-flags -DLDAP_CONNECTIONLESS
414
	fi
415

  
416 391
	if ! use minimal && multilib_is_native_abi; then
417 392
		# SLAPD (Standalone LDAP Daemon) Options
418 393
		# overlay chaining requires '--enable-ldap' #296567
......
427 402
			$(use_enable tcpd wrappers)
428 403
		)
429 404
		if use experimental ; then
405
			# connectionless ldap per bug #342439
406
			# connectionless is a unsupported feature according to Howard Chu
407
			# see https://bugs.openldap.org/show_bug.cgi?id=9739
408
			append-cppflags -DLDAP_CONNECTIONLESS
409

  
430 410
			myconf+=(
431 411
				--enable-dynacl
432 412
				# ACI build as dynamic module not supported (yet)
......
545 525

  
546 526
	mkdir -p "${BUILD_DIR}"/contrib/ldapc++ || die "could not create ${BUILD_DIR}/contrib/ldapc++ directory"
547 527
	pushd "${BUILD_DIR}/contrib/ldapc++" &>/dev/null || die "pushd contrib/ldapc++"
548

  
549
	local LDFLAGS="${LDFLAGS}"
550
	local CPPFLAGS="${CPPFLAGS}"
551

  
552
	append-ldflags -L"${BUILD_DIR}"/libraries/liblber/.libs -L"${BUILD_DIR}"/libraries/libldap/.libs
528
	local LDFLAGS=${LDFLAGS}
529
	local CPPFLAGS=${CPPFLAGS}
530
	append-ldflags -L"${BUILD_DIR}"/libraries/liblber/.libs \
531
		-L"${BUILD_DIR}"/libraries/libldap/.libs
553 532
	append-cppflags -I"${BUILD_DIR}"/include
554

  
555
	ECONF_SOURCE="${S}"/contrib/ldapc++ econf "${myconf_ldapcpp[@]}"
533
	ECONF_SOURCE=${S}/contrib/ldapc++ \
534
	econf "${myconf_ldapcpp[@]}"
556 535
	popd &>/dev/null || die "popd contrib/ldapc++"
557 536
}
558 537

  
......
643 622
		$(tc-getCC) -shared \
644 623
			-I"${BUILD_DIR}"/include \
645 624
			-I../../../include \
646
			${CPPFLAGS} \
647 625
			${CFLAGS} \
648 626
			-fPIC \
649 627
			${LDFLAGS} \
......
655 633

  
656 634
multilib_src_test() {
657 635
	if multilib_is_native_abi; then
658
		cd tests || die
636
		cd "tests"
659 637
		pwd
660

  
661
		# Increase various test timeouts/delays, bug #894012
662
		# We can't just double everything as there's a cumulative effect.
663
		export SLEEP0=2 # originally 1
664
		export SLEEP1=10 # originally 7
665
		export SLEEP2=20 # originally 15
666
		export TIMEOUT=16 # originally 8
667

  
668 638
		# emake test => runs only lloadd & mdb, in serial; skips ldif,sql,wt,regression
669 639
		# emake partests => runs ALL of the tests in parallel
670 640
		# wt/WiredTiger is not supported in Gentoo
671
		TESTS=( lloadd mdb )
641
		TESTS=( plloadd pmdb )
672 642
		#TESTS+=( pldif ) # not done by default, so also exclude here
673 643
		#use odbc && TESTS+=( psql ) # not done by default, so also exclude here
674

  
675
		emake -Onone "${TESTS[@]}"
644
		emake "${TESTS[@]}"
676 645
	fi
677 646
}
678 647

  
Thank you!