diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2020-02-17 01:16:38 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2020-02-17 01:16:38 +0000 |
commit | 53cba99042fa967e2a93da9f8db806fe2d035543 (patch) | |
tree | 9780d3b87dfc6bdebc6b7b7d15af1ecb813c6853 /net-nds/openldap | |
parent | 71deace00d1a2b091313fe137ab7092418c6f87c (diff) |
gentoo resync : 17.02.2020
Diffstat (limited to 'net-nds/openldap')
-rw-r--r-- | net-nds/openldap/Manifest | 6 | ||||
-rw-r--r-- | net-nds/openldap/openldap-2.4.48.ebuild | 4 | ||||
-rw-r--r-- | net-nds/openldap/openldap-2.4.49-r1.ebuild (renamed from net-nds/openldap/openldap-2.4.45.ebuild) | 257 |
3 files changed, 143 insertions, 124 deletions
diff --git a/net-nds/openldap/Manifest b/net-nds/openldap/Manifest index 2fbff7045e05..72944f8be850 100644 --- a/net-nds/openldap/Manifest +++ b/net-nds/openldap/Manifest @@ -22,9 +22,9 @@ AUX slapd-initd-2.4.40-r2 1726 BLAKE2B 998248677dfec0d71e89cde7233596ec95f017392 AUX slapd.service 284 BLAKE2B 27e3863a8b0e854e5b6b1efce50da624acbfe0d2416af1eedfbc225b5e8307f79441bb4b9afddc7736857a8fd289db65e04e297e314cad48996ab6e3ecca43f6 SHA512 450c93b320101e1c28681cad6694c24332fbe424ac98283b621a2f6e1eb01e9e2dbd80a4142e6e8d01d95c55018b44e847d4f4c55f11d7e0e0a11ae1827daa82 AUX slapd.service.conf 443 BLAKE2B 7cf9d3935ea100006fe4f8667b792d32627c933c72220a91e4d9bf99fab4af9c590834f9aaed57d80eadd2fdf75e49f55739ef6027d11f012f8da3a711707c27 SHA512 be9cf4bf19111bd77c0ce481428e6f3cc183a6939775ed1a2d7606a5162da34178cb139d666288f6a35b8413bd4dc5f8f1bd60b39f3cca8f749557674b93910b AUX slapd.tmpfilesd 90 BLAKE2B f9cdde975b45c61c18773e4a3b30e3cb3c2a7d979bfef6d0513cd33ee5d31acdbe19c0af72a6478576acfaa88a2f063213cb9fd3025f4dda6ac401a8b9488719 SHA512 c462c92911635a2a6a30eb7239e74b529062224f9798351f53dca9a2e25cbc7f9fbb3743f98a015b7ccac0823ab85adb42d91d980f053bc3f12fdce760ce4bec -DIST openldap-2.4.45.tgz 5672845 BLAKE2B e1f97553482a2e8630b62bc0f439af2484f1a2349a1a077382a124354424fe510ab55f32c073565b142d0c9318870fe31a2652268ebabd97d3afd8c833bc7aab SHA512 1c9fc84efed8998f107ce6e1c6be3f5466388241afdca0cb3847720c9def0bc263a2dbc15bf0f9112d1b4c391fd01e8531a4fb08c5532c30fb86924c08daedab DIST openldap-2.4.48.tgz 5704883 BLAKE2B ef856ff0b22c9187e68e9c09583a176fe4c2ee1f5bfe6b169f03bc0058294170ec4d1aa1b164e28eecd2ef6bafab539c1b942b0bd74e93852205beeaff39aeef SHA512 cf694a415be0bd55cc7f606099da2ed461748efd276561944cd29d7f5a8252a9be799d8778fac2d4fa9f382731eb4ca48c6b85630cb58a3b8249843561ae8feb +DIST openldap-2.4.49.tgz 5704723 BLAKE2B ee777588d758f6704b0d38b90feb85b27e2307510a05d1d147324e9958a6f6fc5bc7dd521a1462971c3f707429ad38fab734f508d71fd88b447770e112e844a2 SHA512 99d1943d126b06e62865e31e5825fcff2cb15415f7f85ae4962fa0e7425bc3b58db5b9639150d7b09e3642c80257724c745e47c25ab4fcb1bba0ba771011dd49 DIST rfc2307bis.schema-20140524 12262 BLAKE2B 98031f49e9bde1e4821e637af3382364d8344ed7017649686a088070d96a632dffa6c661552352656b1b159c0fd962965580069a64c7f3d5bb6a3ed75f60fd99 SHA512 83b89a1deeefc8566b97e7e865b9b6d04541099cbdf719e24538a7d27d61b6209e87ab9003a9f140bd9afd018ec569e71721e3a24090e1902c8b6659d2ba103e -EBUILD openldap-2.4.45.ebuild 27900 BLAKE2B afe33486f3f2e3c855617d236d08865b1e27c30ca351d4799b62c427bede705be8c76ed410680fddfd92ec69eaf79528cd2500205e362cee947b29e1a76f1316 SHA512 df994f11cdbddcca41433c96d424480272b32eb0ae02222c35362469dce0c6d8a01566b9f7fc05e8918f8730b6e6a1efefaf9c6a49e06b4a9f192fa0725717ef -EBUILD openldap-2.4.48.ebuild 28961 BLAKE2B 332f5076b12e8d839a13f0f721dde5ba809c8392062b4e079fb894bf5a0d52842ce9adad1cd23fc6f704b42ebe0b0be36a65fb383af87619f10006981c8f9777 SHA512 63b1961034c74a5f35b1ccb7139ae1164fcddc94f3d6dd59071ec2416f337206e5e553c21b10663a52ae0f1ca887e12cb45baacea999f7cb2465f3fcb040e82d +EBUILD openldap-2.4.48.ebuild 28975 BLAKE2B 0d6496042815b96cff3c83961088ee5282020871e5da8069ca11b2014e513f84659fdee9dba7a05b951d010e87fac82373afe2e40a11fc95aece322ae2c1dde3 SHA512 86d28fee699804fd2a6c1c7913a432c77204791deb0d8d50b41b1da40d46a5f30b3eac33a76e0a72bbb5443390b3247849570e8b36310dea7456f7bd993e026f +EBUILD openldap-2.4.49-r1.ebuild 28911 BLAKE2B 25e18c9e977947ba3c82cb226dfa1c6f52eec3dc1ba57c3a026a19b302b64c88504f1c0ebb25245d2b84252c127d4dff7452aa043a29ea3cea2f3220f5d770a9 SHA512 ff2cf3eb731bef8d9bc48f08eb8f27c9ee90688316e16e79b1cce12523f13bbdd7163027849a05350fd579fdee739526a532fecab08ee8262f9e5e1e167edde8 MISC metadata.xml 922 BLAKE2B f99c4b3703f1a22dccbc0bbb109d11ba747c61229ebc811b036784dee829c4f7ce4bd85d4f5b8d7780cf20194d5175511129b9256416eea7daf4094e20d8c1a7 SHA512 fc9eb245cde878a93e08b8213f58b829266b2171ee73a74a39b47e700e506225da36e7d51952586f3d97ad6e0a3b3792fa59b5620bad0749afc87b8d59678ff9 diff --git a/net-nds/openldap/openldap-2.4.48.ebuild b/net-nds/openldap/openldap-2.4.48.ebuild index 293cc88f6abd..2c74c836815c 100644 --- a/net-nds/openldap/openldap-2.4.48.ebuild +++ b/net-nds/openldap/openldap-2.4.48.ebuild @@ -1,9 +1,9 @@ -# Copyright 1999-2019 Gentoo Authors +# Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=6 -inherit autotools db-use eapi7-ver flag-o-matic multilib multilib-minimal ssl-cert toolchain-funcs user systemd +inherit autotools db-use eapi7-ver flag-o-matic multilib multilib-minimal preserve-libs ssl-cert toolchain-funcs user systemd BIS_PN=rfc2307bis.schema BIS_PV=20140524 diff --git a/net-nds/openldap/openldap-2.4.45.ebuild b/net-nds/openldap/openldap-2.4.49-r1.ebuild index a382fec42aa1..8859904cbf51 100644 --- a/net-nds/openldap/openldap-2.4.45.ebuild +++ b/net-nds/openldap/openldap-2.4.49-r1.ebuild @@ -1,9 +1,9 @@ -# Copyright 1999-2019 Gentoo Authors +# Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI="5" +EAPI=7 -inherit db-use eutils flag-o-matic multilib multilib-minimal ssl-cert versionator toolchain-funcs autotools user systemd +inherit autotools db-use flag-o-matic multilib-minimal ssl-cert toolchain-funcs user systemd BIS_PN=rfc2307bis.schema BIS_PV=20140524 @@ -18,18 +18,21 @@ SRC_URI="ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release/${P}.tgz LICENSE="OPENLDAP GPL-2" SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 s390 ~sh sparc x86 ~ppc-aix ~amd64-linux ~x86-linux ~x86-solaris" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-linux ~x86-linux ~x86-solaris" -IUSE_DAEMON="crypt samba slp tcpd experimental minimal" +IUSE_DAEMON="crypt samba tcpd experimental minimal" IUSE_BACKEND="+berkdb" IUSE_OVERLAY="overlays perl" -IUSE_OPTIONAL="gnutls iodbc sasl ssl odbc debug ipv6 libressl +syslog selinux static-libs" +IUSE_OPTIONAL="gnutls iodbc sasl ssl odbc debug ipv6 libressl +syslog selinux static-libs test" IUSE_CONTRIB="smbkrb5passwd kerberos kinit pbkdf2 sha2" IUSE_CONTRIB="${IUSE_CONTRIB} -cxx" IUSE="${IUSE_DAEMON} ${IUSE_BACKEND} ${IUSE_OVERLAY} ${IUSE_OPTIONAL} ${IUSE_CONTRIB}" +RESTRICT="!test? ( test )" REQUIRED_USE="cxx? ( sasl ) - pbkdf2? ( ssl )" + pbkdf2? ( ssl ) + test? ( berkdb ) + ?? ( test minimal )" # always list newer first # Do not add any AGPL-3 BDB here! @@ -40,7 +43,7 @@ BDB_PKGS='' for _slot in $BDB_SLOTS; do BDB_PKGS="${BDB_PKGS} sys-libs/db:${_slot}" ; done # openssl is needed to generate lanman-passwords required by samba -CDEPEND=" +COMMON_DEPEND=" ssl? ( !gnutls? ( !libressl? ( >=dev-libs/openssl-1.0.1h-r2:0=[${MULTILIB_USEDEP}] ) @@ -59,11 +62,10 @@ CDEPEND=" tcpd? ( sys-apps/tcp-wrappers ) odbc? ( !iodbc? ( dev-db/unixODBC ) iodbc? ( dev-db/libiodbc ) ) - slp? ( net-libs/openslp ) perl? ( dev-lang/perl:=[-build(-)] ) samba? ( !libressl? ( dev-libs/openssl:0= ) - libressl? ( dev-libs/libressl ) + libressl? ( dev-libs/libressl:0= ) ) berkdb? ( <sys-libs/db-6.0:= @@ -71,7 +73,7 @@ CDEPEND=" ) smbkrb5passwd? ( !libressl? ( dev-libs/openssl:0= ) - libressl? ( dev-libs/libressl ) + libressl? ( dev-libs/libressl:0= ) kerberos? ( app-crypt/heimdal ) ) kerberos? ( @@ -79,10 +81,12 @@ CDEPEND=" kinit? ( !app-crypt/heimdal ) ) cxx? ( dev-libs/cyrus-sasl:= ) - )" -DEPEND="${CDEPEND} - sys-apps/groff" -RDEPEND="${CDEPEND} + ) +" +DEPEND="${COMMON_DEPEND} + sys-apps/groff +" +RDEPEND="${COMMON_DEPEND} selinux? ( sec-policy/selinux-ldap ) " # for tracking versions @@ -127,6 +131,45 @@ MULTILIB_WRAPPED_HEADERS=( /usr/include/TlsOptions.h ) +PATCHES=( + "${FILESDIR}"/${PN}-2.4.17-gcc44.patch + + "${FILESDIR}"/${PN}-2.2.14-perlthreadsfix.patch + "${FILESDIR}"/${PN}-2.4.15-ppolicy.patch + + # bug #116045 - still present in 2.4.28 + "${FILESDIR}"/${PN}-2.4.35-contrib-smbk5pwd.patch + # bug #408077 - samba4 + "${FILESDIR}"/${PN}-2.4.35-contrib-samba4.patch + + # bug #189817 + "${FILESDIR}"/${PN}-2.4.11-libldap_r.patch + + # bug #233633 + "${FILESDIR}"/${PN}-2.4.45-fix-lmpasswd-gnutls-symbols.patch + + # bug #281495 + "${FILESDIR}"/${PN}-2.4.28-gnutls-gcrypt.patch + + # bug #294350 + "${FILESDIR}"/${PN}-2.4.6-evolution-ntlm.patch + + # unbreak /bin/sh -> dash + "${FILESDIR}"/${PN}-2.4.28-fix-dash.patch + + # bug #420959 + "${FILESDIR}"/${PN}-2.4.31-gcc47.patch + + # unbundle lmdb + "${FILESDIR}"/${PN}-2.4.42-mdb-unbundle.patch + + # bug #622464 + "${FILESDIR}"/${PN}-2.4.47-libressl.patch + + # fix some compiler warnings + "${FILESDIR}"/${PN}-2.4.47-warnings.patch +) + openldap_filecount() { local dir="$1" find "${dir}" -type f ! -name '.*' ! -name 'DB_CONFIG*' | wc -l @@ -134,11 +177,11 @@ openldap_filecount() { openldap_find_versiontags() { # scan for all datadirs - openldap_datadirs="" - if [ -f "${EROOT}"/etc/openldap/slapd.conf ]; then - openldap_datadirs="$(awk '{if($1 == "directory") print $2 }' ${EROOT}/etc/openldap/slapd.conf)" + local openldap_datadirs=() + if [[ -f "${EROOT}"/etc/openldap/slapd.conf ]]; then + openldap_datadirs=( $(awk '{if($1 == "directory") print $2 }' "${EROOT}"/etc/openldap/slapd.conf) ) fi - openldap_datadirs="${openldap_datadirs} ${OPENLDAP_DEFAULTDIR_VERSIONTAG}" + openldap_datadirs+=( ${OPENLDAP_DEFAULTDIR_VERSIONTAG} ) einfo einfo "Scanning datadir(s) from slapd.conf and" @@ -149,28 +192,28 @@ openldap_find_versiontags() { # scan datadirs if we have a version tag openldap_found_tag=0 have_files=0 - for each in ${openldap_datadirs}; do - CURRENT_TAGDIR=${ROOT}`echo ${each} | sed "s:\/::"` - CURRENT_TAG=${CURRENT_TAGDIR}/${OPENLDAP_VERSIONTAG} - if [ -d ${CURRENT_TAGDIR} ] && [ ${openldap_found_tag} == 0 ] ; then + for each in ${openldap_datadirs[@]} ; do + CURRENT_TAGDIR="${ROOT}$(sed "s:\/::" <<< ${each})" + CURRENT_TAG="${CURRENT_TAGDIR}/${OPENLDAP_VERSIONTAG}" + if [[ -d "${CURRENT_TAGDIR}" ]] && [[ "${openldap_found_tag}" == 0 ]] ; then einfo "- Checking ${each}..." - if [ -r ${CURRENT_TAG} ] ; then + if [[ -r "${CURRENT_TAG}" ]] ; then # yey, we have one :) einfo " Found Versiontag in ${each}" - source ${CURRENT_TAG} - if [ "${OLDPF}" == "" ] ; then + source "${CURRENT_TAG}" + if [[ "${OLDPF}" == "" ]] ; then eerror "Invalid Versiontag found in ${CURRENT_TAGDIR}" eerror "Please delete it" eerror die "Please kill the invalid versiontag in ${CURRENT_TAGDIR}" fi - OLD_MAJOR=`get_version_component_range 2-3 ${OLDPF}` + OLD_MAJOR=$(ver_cut 2-3 ${OLDPF}) - [ $(openldap_filecount ${CURRENT_TAGDIR}) -gt 0 ] && have_files=1 + [[ "$(openldap_filecount ${CURRENT_TAGDIR})" -gt 0 ]] && have_files=1 # are we on the same branch? - if [ "${OLD_MAJOR}" != "${PV:0:3}" ] ; then + if [[ "${OLD_MAJOR}" != "${PV:0:3}" ]] ; then ewarn " Versiontag doesn't match current major release!" if [[ "${have_files}" == "1" ]] ; then eerror " Versiontag says other major and you (probably) have datafiles!" @@ -184,7 +227,7 @@ openldap_find_versiontags() { fi else einfo " Non-tagged dir ${each}" - [ $(openldap_filecount ${each}) -gt 0 ] && have_files=1 + [[ "$(openldap_filecount ${each})" -gt 0 ]] && have_files=1 if [[ "${have_files}" == "1" ]] ; then einfo " EEK! Non-empty non-tagged datadir, counting `ls -a ${each} | wc -l` files" echo @@ -206,45 +249,45 @@ openldap_find_versiontags() { einfo fi done - [ "${have_files}" == "1" ] && einfo "DB files present" || einfo "No DB files present" + [[ "${have_files}" == "1" ]] && einfo "DB files present" || einfo "No DB files present" # Now we must check for the major version of sys-libs/db linked against. - SLAPD_PATH=${EROOT}/usr/$(get_libdir)/openldap/slapd - if [ "${have_files}" == "1" -a -f "${SLAPD_PATH}" ]; then + SLAPD_PATH="${EROOT}/usr/$(get_libdir)/openldap/slapd" + if [[ "${have_files}" == "1" ]] && [[ -f "${SLAPD_PATH}" ]]; then OLDVER="$(/usr/bin/ldd ${SLAPD_PATH} \ | awk '/libdb-/{gsub("^libdb-","",$1);gsub(".so$","",$1);print $1}')" if use berkdb; then # find which one would be used - for bdb_slot in $BDB_SLOTS ; do + for bdb_slot in ${BDB_SLOTS} ; do NEWVER="$(db_findver "=sys-libs/db-${bdb_slot}*")" - [[ -n "$NEWVER" ]] && break + [[ -n "${NEWVER}" ]] && break done fi local fail=0 - if [ -z "${OLDVER}" -a -z "${NEWVER}" ]; then + if [[ -z "${OLDVER}" ]] && [[ -z "${NEWVER}" ]]; then : # Nothing wrong here. - elif [ -z "${OLDVER}" -a -n "${NEWVER}" ]; then + elif [[ -z "${OLDVER}" ]] && [[ -n "${NEWVER}" ]]; then eerror " Your existing version of OpenLDAP was not built against" eerror " any version of sys-libs/db, but the new one will build" eerror " against ${NEWVER} and your database may be inaccessible." echo fail=1 - elif [ -n "${OLDVER}" -a -z "${NEWVER}" ]; then + elif [[ -n "${OLDVER}" ]] && [[ -z "${NEWVER}" ]]; then eerror " Your existing version of OpenLDAP was built against" eerror " sys-libs/db:${OLDVER}, but the new one will not be" eerror " built against any version and your database may be" eerror " inaccessible." echo fail=1 - elif [ "${OLDVER}" != "${NEWVER}" ]; then + elif [[ "${OLDVER}" != "${NEWVER}" ]]; then eerror " Your existing version of OpenLDAP was built against" eerror " sys-libs/db:${OLDVER}, but the new one will build against" eerror " ${NEWVER} and your database would be inaccessible." echo fail=1 fi - [ "${fail}" == "1" ] && openldap_upgrade_howto + [[ "${fail}" == "1" ]] && openldap_upgrade_howto fi echo @@ -254,6 +297,7 @@ openldap_find_versiontags() { } openldap_upgrade_howto() { + local d l i eerror eerror "A (possible old) installation of OpenLDAP was detected," eerror "installation will not proceed for now." @@ -279,7 +323,7 @@ openldap_upgrade_howto() { eerror "10. check that your data is intact." eerror "11. set up the new replication system." eerror - if [ "${FORCE_UPGRADE}" != "1" ]; then + if [[ "${FORCE_UPGRADE}" != "1" ]]; then die "You need to upgrade your database first" else eerror "You have the magical FORCE_UPGRADE=1 in place." @@ -310,69 +354,33 @@ pkg_setup() { src_prepare() { # ensure correct SLAPI path by default - sed -i -e 's,\(#define LDAPI_SOCK\).*,\1 "'"${EPREFIX}"'/var/run/openldap/slapd.sock",' \ - "${S}"/include/ldap_defaults.h - - epatch "${FILESDIR}"/${PN}-2.4.17-gcc44.patch + sed -e 's,\(#define LDAPI_SOCK\).*,\1 "'"${EPREFIX}"'/var/run/openldap/slapd.sock",' \ + -i include/ldap_defaults.h || die - epatch \ - "${FILESDIR}"/${PN}-2.2.14-perlthreadsfix.patch \ - "${FILESDIR}"/${PN}-2.4.15-ppolicy.patch + default + rm -r libraries/liblmdb || die - # bug #116045 - still present in 2.4.28 - epatch "${FILESDIR}"/${PN}-2.4.35-contrib-smbk5pwd.patch - # bug #408077 - samba4 - epatch "${FILESDIR}"/${PN}-2.4.35-contrib-samba4.patch - - # bug #189817 - epatch "${FILESDIR}"/${PN}-2.4.11-libldap_r.patch - - # bug #233633 - epatch "${FILESDIR}"/${PN}-2.4.45-fix-lmpasswd-gnutls-symbols.patch - - # bug #281495 - epatch "${FILESDIR}"/${PN}-2.4.28-gnutls-gcrypt.patch - - # bug #294350 - epatch "${FILESDIR}"/${PN}-2.4.6-evolution-ntlm.patch - - # unbreak /bin/sh -> dash - epatch "${FILESDIR}"/${PN}-2.4.28-fix-dash.patch - - # bug #420959 - epatch "${FILESDIR}"/${PN}-2.4.31-gcc47.patch - - # bug #622464 - epatch "${FILESDIR}"/${PN}-2.4.45-libressl.patch - - # unbundle lmdb - epatch "${FILESDIR}"/${PN}-2.4.42-mdb-unbundle.patch - rm -rf "${S}"/libraries/liblmdb - - epatch_user - - cd "${S}"/build || die + pushd build &>/dev/null || die "pushd build" einfo "Making sure upstream build strip does not do stripping too early" sed -i.orig \ -e '/^STRIP/s,-s,,g' \ top.mk || die "Failed to block stripping" + popd &>/dev/null || die # wrong assumption that /bin/sh is /bin/bash - sed -i \ + sed \ -e 's|/bin/sh|/bin/bash|g' \ - "${S}"/tests/scripts/* || die "sed failed" - - cd "${S}" || die + -i tests/scripts/* || die "sed failed" AT_NOEAUTOMAKE=yes eautoreconf } build_contrib_module() { # <dir> <sources> <outputname> - cd "${S}/contrib/slapd-modules/$1" || die + pushd "${S}/contrib/slapd-modules/$1" &>/dev/null || die "pushd contrib/slapd-modules/$1" einfo "Compiling contrib-module: $3" # Make sure it's uppercase - local define_name="$(echo "SLAPD_OVER_${1}" | LC_ALL=C tr '[:lower:]' '[:upper:]')" + local define_name="$(LC_ALL=C tr '[:lower:]' '[:upper:]' <<< "SLAPD_OVER_${1}")" "${lt}" --mode=compile --tag=CC \ "${CC}" \ -D${define_name}=SLAPD_MOD_DYNAMIC \ @@ -386,6 +394,7 @@ build_contrib_module() { ${LDFLAGS} \ -rpath "${EPREFIX}"/usr/$(get_libdir)/openldap/openldap \ -o $3.la ${2%.c}.lo || die "linking $3 failed" + popd &>/dev/null || die } src_configure() { @@ -418,8 +427,8 @@ multilib_src_configure() { if use berkdb ; then einfo "Using Berkeley DB for local backend" myconf+=( --enable-bdb --enable-hdb ) - DBINCLUDE=$(db_includedir $BDB_SLOTS) - einfo "Using $DBINCLUDE for sys-libs/db version" + DBINCLUDE=$(db_includedir ${BDB_SLOTS}) + einfo "Using ${DBINCLUDE} for sys-libs/db version" # We need to include the slotted db.h dir for FreeBSD append-cppflags -I${DBINCLUDE} else @@ -444,7 +453,7 @@ multilib_src_configure() { # slapd options myconf+=( $(use_enable crypt) - $(use_enable slp) + --disable-slp $(use_enable samba lmpasswd) $(use_enable syslog) ) @@ -501,7 +510,8 @@ multilib_src_configure() { done tc-export AR CC CXX - ECONF_SOURCE=${S} \ + CONFIG_SHELL="/bin/bash" \ + ECONF_SOURCE="${S}" \ STRIP=/bin/true \ econf \ --libexecdir="${EPREFIX}"/usr/$(get_libdir)/openldap \ @@ -519,7 +529,7 @@ src_configure_cxx() { ) mkdir -p "${BUILD_DIR}"/contrib/ldapc++ || die - cd "${BUILD_DIR}/contrib/ldapc++" || die + pushd "${BUILD_DIR}/contrib/ldapc++" &>/dev/null || die "pushd contrib/ldapc++" local LDFLAGS=${LDFLAGS} CPPFLAGS=${CPPFLAGS} append-ldflags -L"${BUILD_DIR}"/libraries/liblber/.libs \ @@ -529,6 +539,7 @@ src_configure_cxx() { econf "${myconf_ldapcpp[@]}" \ CC="${CC}" \ CXX="${CXX}" + popd &>/dev/null || die } multilib_src_compile() { @@ -541,14 +552,14 @@ multilib_src_compile() { if use cxx ; then einfo "Building contrib library: ldapc++" src_configure_cxx - cd "${BUILD_DIR}/contrib/ldapc++" || die - emake \ - CC="${CC}" CXX="${CXX}" + pushd "${BUILD_DIR}/contrib/ldapc++" &>/dev/null || die "pushd contrib/ldapc++" + emake CC="${CC}" CXX="${CXX}" + popd &>/dev/null || die fi if use smbkrb5passwd ; then einfo "Building contrib-module: smbk5pwd" - cd "${S}/contrib/slapd-modules/smbk5pwd" || die + pushd "${S}/contrib/slapd-modules/smbk5pwd" &>/dev/null || die "pushd contrib/slapd-modules/smbk5pwd" MY_DEFS="-DDO_SHADOW" if use samba ; then @@ -565,22 +576,24 @@ multilib_src_compile() { KRB5_INC="${MY_KRB5_INC}" \ LDAP_BUILD="${BUILD_DIR}" \ CC="${CC}" libexecdir="${EPREFIX}/usr/$(get_libdir)/openldap" + popd &>/dev/null || die fi if use overlays ; then einfo "Building contrib-module: samba4" - cd "${S}/contrib/slapd-modules/samba4" || die + pushd "${S}/contrib/slapd-modules/samba4" &>/dev/null || die "pushd contrib/slapd-modules/samba4" emake \ LDAP_BUILD="${BUILD_DIR}" \ CC="${CC}" libexecdir="/usr/$(get_libdir)/openldap" + popd &>/dev/null || die fi if use kerberos ; then if use kinit ; then build_contrib_module "kinit" "kinit.c" "kinit" fi - cd "${S}/contrib/slapd-modules/passwd" || die + pushd "${S}/contrib/slapd-modules/passwd" &>/dev/null || die "pushd contrib/slapd-modules/passwd" einfo "Compiling contrib-module: pw-kerberos" "${lt}" --mode=compile --tag=CC \ "${CC}" \ @@ -599,10 +612,11 @@ multilib_src_compile() { -rpath "${EPREFIX}"/usr/$(get_libdir)/openldap/openldap \ -o pw-kerberos.la \ kerberos.lo || die "linking pw-kerberos failed" + popd &>/dev/null || die fi if use pbkdf2; then - cd "${S}/contrib/slapd-modules/passwd/pbkdf2" || die + pushd "${S}/contrib/slapd-modules/passwd/pbkdf2" &>/dev/null || die "pushd contrib/slapd-modules/passwd/pbkdf2" einfo "Compiling contrib-module: pw-pbkdf2" "${lt}" --mode=compile --tag=CC \ "${CC}" \ @@ -619,10 +633,11 @@ multilib_src_compile() { -rpath "${EPREFIX}"/usr/$(get_libdir)/openldap/openldap \ -o pw-pbkdf2.la \ pbkdf2.lo || die "linking pw-pbkdf2 failed" + popd &>/dev/null || die fi if use sha2 ; then - cd "${S}/contrib/slapd-modules/passwd/sha2" || die + pushd "${S}/contrib/slapd-modules/passwd/sha2" &>/dev/null || die "pushd contrib/slapd-modules/passwd/sha2" einfo "Compiling contrib-module: pw-sha2" "${lt}" --mode=compile --tag=CC \ "${CC}" \ @@ -646,10 +661,11 @@ multilib_src_compile() { -rpath "${EPREFIX}"/usr/$(get_libdir)/openldap/openldap \ -o pw-sha2.la \ sha2.lo slapd-sha2.lo || die "linking pw-sha2 failed" + popd &>/dev/null || die fi # We could build pw-radius if GNURadius would install radlib.h - cd "${S}/contrib/slapd-modules/passwd" || die + pushd "${S}/contrib/slapd-modules/passwd" &>/dev/null || die "pushd contrib/slapd-modules/passwd" einfo "Compiling contrib-module: pw-netscape" "${lt}" --mode=compile --tag=CC \ "${CC}" \ @@ -685,8 +701,9 @@ multilib_src_compile() { build_contrib_module "nops" "nops.c" "nops-overlay" #build_contrib_module "nssov" "nssov.c" "nssov-overlay" RESO:LATER build_contrib_module "trace" "trace.c" "trace" + popd &>/dev/null || die # build slapi-plugins - cd "${S}/contrib/slapi-plugins/addrdnvalues" || die + pushd "${S}/contrib/slapi-plugins/addrdnvalues" &>/dev/null || die "pushd contrib/slapi-plugins/addrdnvalues" einfo "Building contrib-module: addrdnvalues plugin" "${CC}" -shared \ -I"${BUILD_DIR}"/include \ @@ -696,7 +713,7 @@ multilib_src_compile() { ${LDFLAGS} \ -o libaddrdnvalues-plugin.so \ addrdnvalues.c || die "Building libaddrdnvalues-plugin.so failed" - + popd &>/dev/null || die fi } @@ -726,21 +743,21 @@ multilib_src_install() { echo "# to track versions for upgrading." >> "${ED}${OPENLDAP_DEFAULTDIR_VERSIONTAG}/${OPENLDAP_VERSIONTAG}" # use our config - rm "${ED}"etc/openldap/slapd.conf + rm "${ED}"/etc/openldap/slapd.conf insinto /etc/openldap newins "${FILESDIR}"/${PN}-2.4.40-slapd-conf slapd.conf - configfile="${ED}"etc/openldap/slapd.conf + configfile="${ED}"/etc/openldap/slapd.conf # populate with built backends ebegin "populate config with built backends" - for x in "${ED}"usr/$(get_libdir)/openldap/openldap/back_*.so; do + for x in "${ED}"/usr/$(get_libdir)/openldap/openldap/back_*.so; do einfo "Adding $(basename ${x})" - sed -e "/###INSERTDYNAMICMODULESHERE###$/a# moduleload\t$(basename ${x})" -i "${configfile}" + sed -e "/###INSERTDYNAMICMODULESHERE###$/a# moduleload\t$(basename ${x})" -i "${configfile}" || die done sed -e "s:###INSERTDYNAMICMODULESHERE###$:# modulepath\t${EPREFIX}/usr/$(get_libdir)/openldap/openldap:" -i "${configfile}" use prefix || fowners root:ldap /etc/openldap/slapd.conf fperms 0640 /etc/openldap/slapd.conf - cp "${configfile}" "${configfile}".default + cp "${configfile}" "${configfile}".default || die eend # install our own init scripts and systemd unit files @@ -756,10 +773,10 @@ multilib_src_install() { systemd_newtmpfilesd "${FILESDIR}"/slapd.tmpfilesd slapd.conf # If built without SLP, we don't need to be before avahi - use slp \ - || sed -i \ + sed -i \ -e '/before/{s/avahi-daemon//g}' \ - "${ED}"etc/init.d/slapd + "${ED}"/etc/init.d/slapd \ + || die if use cxx ; then einfo "Install the ldapc++ library" @@ -792,7 +809,7 @@ multilib_src_install() { for l in */*.la */*/*.la; do [[ -e ${l} ]] || continue "${lt}" --mode=install cp ${l} \ - "${ED}"usr/$(get_libdir)/openldap/openldap || \ + "${ED}"/usr/$(get_libdir)/openldap/openldap || \ die "installing ${l} failed" done @@ -823,7 +840,9 @@ multilib_src_install() { newdoc "${S}"/contrib/slapd-tools/README README.statslog fi - use static-libs || prune_libtool_files --all + if ! use static-libs ; then + find "${ED}" \( -name '*.a' -o -name '*.la' \) -delete || die + fi } multilib_src_install_all() { @@ -847,7 +866,7 @@ pkg_postinst() { # and a misconfiguration if multiple machines use the same key and cert. if use ssl; then install_cert /etc/openldap/ssl/ldap - use prefix || chown ldap:ldap "${EROOT}"etc/openldap/ssl/ldap.* + use prefix || chown ldap:ldap "${EROOT}"/etc/openldap/ssl/ldap.* ewarn "Self-signed SSL certificates are treated harshly by OpenLDAP 2.[12]" ewarn "Self-signed SSL certificates are treated harshly by OpenLDAP 2.[12]" ewarn "add 'TLS_REQCERT allow' if you want to use them." @@ -862,11 +881,11 @@ pkg_postinst() { fi # These lines force the permissions of various content to be correct - use prefix || chown ldap:ldap "${EROOT}"var/run/openldap - chmod 0755 "${EROOT}"var/run/openldap - use prefix || chown root:ldap "${EROOT}"etc/openldap/slapd.conf{,.default} - chmod 0640 "${EROOT}"etc/openldap/slapd.conf{,.default} - use prefix || chown ldap:ldap "${EROOT}"var/lib/openldap-data + use prefix || chown ldap:ldap "${EROOT}"/var/run/openldap + chmod 0755 "${EROOT}"/var/run/openldap || die + use prefix || chown root:ldap "${EROOT}"/etc/openldap/slapd.conf{,.default} + chmod 0640 "${EROOT}"/etc/openldap/slapd.conf{,.default} || die + use prefix || chown ldap:ldap "${EROOT}"/var/lib/openldap-data fi if has_version 'net-nds/openldap[-minimal]' && ((${OPENLDAP_PRINT_MESSAGES})); then |