From 185fa19bbf68a4d4dca534d2b46729207a177f16 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Tue, 11 May 2021 19:55:43 +0100 Subject: gentoo resync : 11.05.2021 --- net-nds/Manifest.gz | Bin 2556 -> 2560 bytes net-nds/gssproxy/Manifest | 2 +- net-nds/gssproxy/gssproxy-0.8.4.ebuild | 2 +- net-nds/jxplorer/Manifest | 2 +- net-nds/jxplorer/jxplorer-3.3.1.2-r1.ebuild | 75 +++ net-nds/jxplorer/jxplorer-3.3.1.2.ebuild | 74 --- net-nds/openldap/Manifest | 2 + net-nds/openldap/openldap-2.5.4.ebuild | 838 ++++++++++++++++++++++++++++ 8 files changed, 918 insertions(+), 77 deletions(-) create mode 100644 net-nds/jxplorer/jxplorer-3.3.1.2-r1.ebuild delete mode 100644 net-nds/jxplorer/jxplorer-3.3.1.2.ebuild create mode 100644 net-nds/openldap/openldap-2.5.4.ebuild (limited to 'net-nds') diff --git a/net-nds/Manifest.gz b/net-nds/Manifest.gz index 11e260ef1af1..a399bacfaeed 100644 Binary files a/net-nds/Manifest.gz and b/net-nds/Manifest.gz differ diff --git a/net-nds/gssproxy/Manifest b/net-nds/gssproxy/Manifest index 74ef27418a5f..ac7afbd60306 100644 --- a/net-nds/gssproxy/Manifest +++ b/net-nds/gssproxy/Manifest @@ -2,5 +2,5 @@ AUX gssproxy 276 BLAKE2B f529b72cc589910a8c7c5f76428359e6bbca612e3ce78f1a0221365 DIST gssproxy-0.8.3.tar.gz 565100 BLAKE2B a8b3d96ca0b1cc314af3b63cc5959c9b48287ea0169ea75f8a8902bbd5757542fd24e1fa3f603b2a7d4c15878600145bf5a27e880e935a7a037ca3ebc9fcfb9c SHA512 144b10ec4e19ad2ded5ae57adf1ca311e2fc6c2b97e202eedde69d82c8d50afc0459ac36c7fc5d5290184eb68547a696b33e8a069fde43478104ac26b2c98bc2 DIST gssproxy-0.8.4.tar.gz 567579 BLAKE2B 55519d2d439e168df0346cfa2655e01bc90191e17ea7d8c72c5f29c22ed6adca39e5adb4fd900f6dc756147b2fbee23212bfc097c38ab927e6c9679b0186fa2c SHA512 ab81c40d6c7b1908751feb107d8da66603b7681fb67aa7a1f30194a81d542ca89e6c2f34425e9356b9c55eb3691bfa240ba41441c01498af45e862a133cd088a EBUILD gssproxy-0.8.3.ebuild 2807 BLAKE2B fd06a46cd3fd392ef0e75a2a5b6599d65289a88b1cbde9c76776258fc6eabcea6df888ab8d7c8dca2c275691f63a155c9ed89c0d40726b95331e7e58b30b78b8 SHA512 0e0b49feb105c9dae277ea23ccfd3ce36fd4b32781c1109ff996c7ae491857b92495e47af4b0c9d293c62a5f5449b9ccc584f7dd2104ff3ae7907b9b35b94696 -EBUILD gssproxy-0.8.4.ebuild 2811 BLAKE2B b0a0526c2bdcd5ef3a94eda01b64b869c4bd52f0faf9c52ec07936daff637fc35c4172df1e9b71fa9b14dbd4b93b5557d5c79eb6f16f5b3ffe3c176c35e0d211 SHA512 8d53fc9fe17f99356bb2f2ce6af89ddbc973b5a0dee691cc75c6bf80178efc0acfb37a992eb684508aab6748f6e2030cdeb27d8de80de4d2aec5d906fe61a9b5 +EBUILD gssproxy-0.8.4.ebuild 2807 BLAKE2B 018f555f13754fd0673e2597ad55ff019e7d5d7d177ebc3b889d4c1debc4477ca3ba1e852e411064477a55711138b9d3cf0418b18c294b63750a78d62ca52d46 SHA512 8318e5c635a5e5177277f6614e30149fadde1044bdabb4f0eb95ad7cefaa0fed01a9ca071a34fffca025bad56b341db30160cb9b2ce9e8da38cfbccbc86f55c8 MISC metadata.xml 220 BLAKE2B 8ead86e7c2e2a8ecb0068c4ebcf5322f3ccce91c48fb2bc0b62bc6400609f57b3d5c37f92351f748da0e603129fe3e7be8dfcdb6294e003bf33e3ac0ca30eb48 SHA512 c262561324e85dc1fe18ceede654af3ae9f494b36233a807944dbbc7ac9764c93654d1faf958ef4c98c1fb370c71f5073443294289f43ddee0c76e606a703d32 diff --git a/net-nds/gssproxy/gssproxy-0.8.4.ebuild b/net-nds/gssproxy/gssproxy-0.8.4.ebuild index 5bb81004b8fc..dd5999942c52 100644 --- a/net-nds/gssproxy/gssproxy-0.8.4.ebuild +++ b/net-nds/gssproxy/gssproxy-0.8.4.ebuild @@ -9,7 +9,7 @@ SRC_URI="https://github.com/gssapi/${PN}/releases/download/v${PV}/${P}.tar.gz" LICENSE="BSD-1" SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86" +KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ppc ppc64 ~s390 ~sparc x86" IUSE="debug selinux systemd hardened" COMMON_DEPEND=">=dev-libs/libverto-0.2.2 diff --git a/net-nds/jxplorer/Manifest b/net-nds/jxplorer/Manifest index 485ba09c44d0..3bda8379a807 100644 --- a/net-nds/jxplorer/Manifest +++ b/net-nds/jxplorer/Manifest @@ -2,5 +2,5 @@ AUX 3.3-disable-jxworkbench.patch 475 BLAKE2B cee976aa6468def72fe0dcfaf6d68a3377 AUX build.xml 1871 BLAKE2B 0edb1b98c8b2f8b2de5996b1ce8ef8558d08fdff034d5187460a3d6a01962bf01f4c3d4bfa02d320e80445b61f3b49291825ccfa413d7f7dd7438e285c41d34c SHA512 39434bad8cb85692fe65feb927ba675135e0da5401518f22ff6a17c1edfea950342bde9f7530cd48e603f41547451020aa4e0c96dbbf664548cd812ce777fa00 AUX jxplorer-3-pre 663 BLAKE2B d7311e13b367c74af7ebc005c15ef14af80057c995f2d30dd684a49c09c10e165d5c18721f7c266ff4066a904f0ad34e3570e250ebebe2b8486fe54cd7d26875 SHA512 11acb8c28a063825678ec3fe7bafc1cd1d0f99c96d49e62500d06b0584967017efb050c561826ce8b6db8a73da66ea1742f4a361fddc4e17abddad5174106f9f DIST jxplorer-3.3.1.2-project.zip 4625538 BLAKE2B b1bfb552dd4524f4d0fde4ff15617bf3e50629c0f879f05ee87c9f301afa9a5a4c544c8bb85d5b9639fe809f030752f9e96c321a4e6d20fda7aa55097363bdeb SHA512 6c95de48b2abd41a4926de3bd9bd203e266676028e12d1f1c93d8ef6f10b233eefcb122c8c075d6758b43c85e30fdc4b01d55811e5fcbdcd64d353c6f0fef94a -EBUILD jxplorer-3.3.1.2.ebuild 1708 BLAKE2B acf35724b8fb16f5dd53da77aa0329f64324fb02acf0127130262e6df4d350a1b0dda00ba7a4dc1438ef7b050b2816c40debe9a4a7da6ba827e7da200a5988ab SHA512 e542a1e5dd0584c38d78f992eb95f4f2709bb9fe979b14c6fada97d571942f1b6dfb195d3967be6f2a0d19fa7079ed5ce6bff0b8326e2a7dd0374d8dbfc72b7e +EBUILD jxplorer-3.3.1.2-r1.ebuild 1796 BLAKE2B 43eef49d886421732e96f4d67e3829a78c906a95b709d5904e1ee73f6096640b82bd6741191976092f61b12f9027a11feac105e31f3ce14669677d1778ccb571 SHA512 c245a500df028f66c2b10b7fdb7a9f4dffb19775279a172a3003696d0121d46f1d9f34162ffbb1069ff9940a1ccc28aa00f0676f2f62a6ec157a94b6fedd83ba MISC metadata.xml 314 BLAKE2B f90c3010c15a26ffb04114d4049aadedb720df7d6bf04801603d6fb4f63331d6a5f7b135d4d926e0cbc8504849c1677b04b9d61e0fe67ee97ec41d5e30375b88 SHA512 28b10ef2e247491aac4d9868d8c42ccef74abdc9806820b84a29d479e8f53218e1aab497c3f450c289cacf40ea8fbd193a508203ffc915ad2fb7582258bc7d96 diff --git a/net-nds/jxplorer/jxplorer-3.3.1.2-r1.ebuild b/net-nds/jxplorer/jxplorer-3.3.1.2-r1.ebuild new file mode 100644 index 000000000000..f04c1b33ba7c --- /dev/null +++ b/net-nds/jxplorer/jxplorer-3.3.1.2-r1.ebuild @@ -0,0 +1,75 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +JAVA_PKG_IUSE="doc source test" +inherit desktop java-pkg-2 java-ant-2 prefix virtualx + +DESCRIPTION="Fully functional LDAP browser written in Java" +HOMEPAGE="http://jxplorer.org/" +SRC_URI="mirror://sourceforge/${PN}/${P}-project.zip" +S="${WORKDIR}/${PN}" + +LICENSE="CAOSL" +SLOT="0" +KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux" +RESTRICT="test" + +# needs java stuff that is missing in java > 1.8 os has to be restricted +COMMON_DEPEND=" + >=dev-java/javahelp-2.0.02_p46:0 +" +RDEPEND="${COMMON_DEPEND} + virtual/jre:1.8 +" +DEPEND="${COMMON_DEPEND} + virtual/jdk:1.8 + test? ( dev-java/junit:0 ) +" +BDEPEND="app-arch/unzip" + +JAVA_ANT_REWRITE_CLASSPATH="yes" +EANT_GENTOO_CLASSPATH="javahelp" +EANT_TEST_ANT_TASKS="ant-junit" + +PATCHES=( "${FILESDIR}"/3.3-disable-jxworkbench.patch ) + +src_prepare() { + default + + rm -v jars/*.jar || die + sed -i -e 's/${l}" + eerror " 4. mv /var/lib/openldap-data/ /var/lib/openldap-data-backup/" + eerror " 5. emerge --update \=net-nds/${PF}" + eerror " 6. etc-update, and ensure that you apply the changes" + eerror " 7. slapadd -l ${l}" + eerror " 8. chown ldap:ldap /var/lib/openldap-data/*" + eerror " 9. /etc/init.d/slapd start" + eerror "10. check that your data is intact." + eerror "11. set up the new replication system." + eerror + if [[ "${FORCE_UPGRADE}" != "1" ]]; then + die "You need to upgrade your database first" + else + eerror "You have the magical FORCE_UPGRADE=1 in place." + eerror "Don't say you weren't warned about data loss." + fi +} + +pkg_setup() { + if ! use sasl && use cxx ; then + die "To build the ldapc++ library you must emerge openldap with sasl support" + fi + # Bug #322787 + if use minimal && ! has_version "net-nds/openldap" ; then + einfo "No datadir scan needed, openldap not installed" + elif use minimal && has_version 'net-nds/openldap[minimal]' ; then + einfo "Skipping scan for previous datadirs as requested by minimal useflag" + else + openldap_find_versiontags + fi +} + +src_prepare() { + # ensure correct SLAPI path by default + sed -e 's,\(#define LDAPI_SOCK\).*,\1 "'"${EPREFIX}"'/var/run/openldap/slapd.sock",' \ + -i include/ldap_defaults.h || die + + default + rm -r libraries/liblmdb || 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 + + AT_NOEAUTOMAKE=yes eautoreconf +} + +build_contrib_module() { + # + 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="$(LC_ALL=C tr '[:lower:]' '[:upper:]' <<< "SLAPD_OVER_${1}")" + "${lt}" --mode=compile --tag=CC \ + "${CC}" \ + -D${define_name}=SLAPD_MOD_DYNAMIC \ + -I"${BUILD_DIR}"/include \ + -I../../../include -I../../../servers/slapd ${CFLAGS} \ + -o ${2%.c}.lo -c $2 || die "compiling $3 failed" + einfo "Linking contrib-module: $3" + "${lt}" --mode=link --tag=CC \ + "${CC}" -module \ + ${CFLAGS} \ + ${LDFLAGS} \ + -rpath "${EPREFIX}"/usr/$(get_libdir)/openldap/openldap \ + -o $3.la ${2%.c}.lo || die "linking $3 failed" + popd &>/dev/null || die +} + +src_configure() { + # Bug 408001 + use elibc_FreeBSD && append-cppflags -DMDB_DSYNC=O_SYNC -DMDB_FDATASYNC=fsync + + # connectionless ldap per bug #342439 + append-cppflags -DLDAP_CONNECTIONLESS + + multilib-minimal_src_configure +} + +multilib_src_configure() { + local myconf=() + + use debug && myconf+=( $(use_enable debug) ) + + # ICU exists only in the configure, nowhere in the codebase, bug #510858 + export ac_cv_header_unicode_utypes_h=no ol_cv_lib_icu=no + + if ! use minimal && multilib_is_native_abi; then + local CPPFLAGS=${CPPFLAGS} + + # re-enable serverside overlay chains per bug #296567 + # see ldap docs chaper 12.3.1 for details + myconf+=( --enable-ldap ) + + # backends + myconf+=( --enable-slapd ) + for backend in dnssrv ldap mdb meta monitor null passwd relay shell sock; do + myconf+=( --enable-${backend}=mod ) + done + + myconf+=( $(use_enable perl perl mod) ) + + myconf+=( $(use_enable odbc sql mod) ) + if use odbc ; then + local odbc_lib="unixodbc" + if use iodbc ; then + odbc_lib="iodbc" + append-cppflags -I"${EPREFIX}"/usr/include/iodbc + fi + myconf+=( --with-odbc=${odbc_lib} ) + fi + + # slapd options + myconf+=( + $(use_enable crypt) + --disable-slp + $(use_enable samba lmpasswd) + $(use_enable syslog) + ) + if use experimental ; then + myconf+=( + --enable-dynacl + --enable-aci=mod + ) + fi + for option in aci cleartext modules rewrite rlookups slapi; do + myconf+=( --enable-${option} ) + done + + # slapd overlay options + # Compile-in the syncprov, the others as module + myconf+=( --enable-syncprov=yes ) + use overlays && myconf+=( --enable-overlays=mod ) + + else + myconf+=( + --disable-backends + --disable-slapd + --disable-mdb + --disable-overlays + --disable-syslog + ) + fi + + # basic functionality stuff + myconf+=( + $(use_enable ipv6) + $(multilib_native_use_with sasl cyrus-sasl) + $(multilib_native_use_enable sasl spasswd) + $(use_enable tcpd wrappers) + ) + + # Some cross-compiling tests don't pan out well. + tc-is-cross-compiler && myconf+=( + --with-yielding-select=yes + ) + + local ssl_lib="no" + if use ssl || ( ! use minimal && use samba ) ; then + ssl_lib="openssl" + use gnutls && ssl_lib="gnutls" + fi + + myconf+=( --with-tls=${ssl_lib} ) + + for basicflag in dynamic local shared; do + myconf+=( --enable-${basicflag} ) + done + + tc-export AR CC CXX + CONFIG_SHELL="/bin/sh" \ + ECONF_SOURCE="${S}" \ + STRIP=/bin/true \ + econf \ + --libexecdir="${EPREFIX}"/usr/$(get_libdir)/openldap \ + $(use_enable static-libs static) \ + "${myconf[@]}" + emake depend +} + +src_configure_cxx() { + # This needs the libraries built by the first build run. + # So we have to run it AFTER the main build, not just after the main + # configure. + local myconf_ldapcpp=( + --with-ldap-includes="${S}"/include + ) + + mkdir -p "${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 \ + -L"${BUILD_DIR}"/libraries/libldap/.libs + append-cppflags -I"${BUILD_DIR}"/include + ECONF_SOURCE=${S}/contrib/ldapc++ \ + econf "${myconf_ldapcpp[@]}" \ + CC="${CC}" \ + CXX="${CXX}" + popd &>/dev/null || die +} + +multilib_src_compile() { + tc-export AR CC CXX + emake CC="${CC}" AR="${AR}" SHELL="${EPREFIX}"/bin/sh + local lt="${BUILD_DIR}/libtool" + export echo="echo" + + if ! use minimal && multilib_is_native_abi ; then + if use cxx ; then + einfo "Building contrib library: ldapc++" + src_configure_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" + pushd "${S}/contrib/slapd-modules/smbk5pwd" &>/dev/null || die "pushd contrib/slapd-modules/smbk5pwd" + + MY_DEFS="-DDO_SHADOW" + if use samba ; then + MY_DEFS="${MY_DEFS} -DDO_SAMBA" + MY_KRB5_INC="" + fi + if use kerberos ; then + MY_DEFS="${MY_DEFS} -DDO_KRB5" + MY_KRB5_INC="$(krb5-config --cflags)" + fi + + emake \ + DEFS="${MY_DEFS}" \ + 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" + 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 + 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}" \ + -I"${BUILD_DIR}"/include \ + -I../../../include \ + ${CFLAGS} \ + $(krb5-config --cflags) \ + -DHAVE_KRB5 \ + -o kerberos.lo \ + -c kerberos.c || die "compiling pw-kerberos failed" + einfo "Linking contrib-module: pw-kerberos" + "${lt}" --mode=link --tag=CC \ + "${CC}" -module \ + ${CFLAGS} \ + ${LDFLAGS} \ + -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 + 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}" \ + -I"${BUILD_DIR}"/include \ + -I../../../../include \ + ${CFLAGS} \ + -o pbkdf2.lo \ + -c pw-pbkdf2.c || die "compiling pw-pbkdf2 failed" + einfo "Linking contrib-module: pw-pbkdf2" + "${lt}" --mode=link --tag=CC \ + "${CC}" -module \ + ${CFLAGS} \ + ${LDFLAGS} \ + -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 + 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}" \ + -I"${BUILD_DIR}"/include \ + -I../../../../include \ + ${CFLAGS} \ + -o sha2.lo \ + -c sha2.c || die "compiling pw-sha2 failed" + "${lt}" --mode=compile --tag=CC \ + "${CC}" \ + -I"${BUILD_DIR}"/include \ + -I../../../../include \ + ${CFLAGS} \ + -o slapd-sha2.lo \ + -c slapd-sha2.c || die "compiling pw-sha2 failed" + einfo "Linking contrib-module: pw-sha2" + "${lt}" --mode=link --tag=CC \ + "${CC}" -module \ + ${CFLAGS} \ + ${LDFLAGS} \ + -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 + 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}" \ + -I"${BUILD_DIR}"/include \ + -I../../../include \ + ${CFLAGS} \ + -o netscape.lo \ + -c netscape.c || die "compiling pw-netscape failed" + einfo "Linking contrib-module: pw-netscape" + "${lt}" --mode=link --tag=CC \ + "${CC}" -module \ + ${CFLAGS} \ + ${LDFLAGS} \ + -rpath "${EPREFIX}"/usr/$(get_libdir)/openldap/openldap \ + -o pw-netscape.la \ + netscape.lo || die "linking pw-netscape failed" + + #build_contrib_module "acl" "posixgroup.c" "posixGroup" # example code only + #build_contrib_module "acl" "gssacl.c" "gss" # example code only, also needs kerberos + build_contrib_module "addpartial" "addpartial-overlay.c" "addpartial-overlay" + build_contrib_module "allop" "allop.c" "overlay-allop" + build_contrib_module "allowed" "allowed.c" "allowed" + build_contrib_module "autogroup" "autogroup.c" "autogroup" + build_contrib_module "cloak" "cloak.c" "cloak" + # build_contrib_module "comp_match" "comp_match.c" "comp_match" # really complex, adds new external deps, questionable demand + build_contrib_module "denyop" "denyop.c" "denyop-overlay" + build_contrib_module "dsaschema" "dsaschema.c" "dsaschema-plugin" + build_contrib_module "dupent" "dupent.c" "dupent" + build_contrib_module "lastbind" "lastbind.c" "lastbind" + # lastmod may not play well with other overlays + build_contrib_module "lastmod" "lastmod.c" "lastmod" + build_contrib_module "noopsrch" "noopsrch.c" "noopsrch" + #build_contrib_module "nops" "nops.c" "nops-overlay" https://bugs.gentoo.org/641576 + #build_contrib_module "nssov" "nssov.c" "nssov-overlay" RESO:LATER + build_contrib_module "trace" "trace.c" "trace" + popd &>/dev/null || die + # build slapi-plugins + 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 \ + -I../../../include \ + ${CFLAGS} \ + -fPIC \ + ${LDFLAGS} \ + -o libaddrdnvalues-plugin.so \ + addrdnvalues.c || die "Building libaddrdnvalues-plugin.so failed" + popd &>/dev/null || die + fi +} + +multilib_src_test() { + if multilib_is_native_abi; then + cd tests || die + emake tests + fi +} + +multilib_src_install() { + local lt="${BUILD_DIR}/libtool" + emake DESTDIR="${D}" SHELL="${EPREFIX}"/bin/sh install + + if ! use minimal && multilib_is_native_abi; then + # openldap modules go here + # TODO: write some code to populate slapd.conf with moduleload statements + keepdir /usr/$(get_libdir)/openldap/openldap/ + + # initial data storage dir + keepdir /var/lib/openldap-data + use prefix || fowners ldap:ldap /var/lib/openldap-data + fperms 0700 /var/lib/openldap-data + + echo "OLDPF='${PF}'" > "${ED}${OPENLDAP_DEFAULTDIR_VERSIONTAG}/${OPENLDAP_VERSIONTAG}" + echo "# do NOT delete this. it is used" >> "${ED}${OPENLDAP_DEFAULTDIR_VERSIONTAG}/${OPENLDAP_VERSIONTAG}" + echo "# to track versions for upgrading." >> "${ED}${OPENLDAP_DEFAULTDIR_VERSIONTAG}/${OPENLDAP_VERSIONTAG}" + + # use our config + 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 + + # populate with built backends + ebegin "populate config with built backends" + 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}" || 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 || die + eend + + # install our own init scripts and systemd unit files + einfo "Install init scripts" + sed -e "s,/usr/lib/,/usr/$(get_libdir)/," "${FILESDIR}"/slapd-initd-2.4.40-r2 > "${T}"/slapd || die + doinitd "${T}"/slapd + newconfd "${FILESDIR}"/slapd-confd-2.4.28-r1 slapd + + einfo "Install systemd service" + sed -e "s,/usr/lib/,/usr/$(get_libdir)/," "${FILESDIR}"/slapd.service > "${T}"/slapd.service || die + systemd_dounit "${T}"/slapd.service + systemd_install_serviced "${FILESDIR}"/slapd.service.conf + newtmpfiles "${FILESDIR}"/slapd.tmpfilesd slapd.conf + + # If built without SLP, we don't need to be before avahi + sed -i \ + -e '/before/{s/avahi-daemon//g}' \ + "${ED}"/etc/init.d/slapd \ + || die + + if use cxx ; then + einfo "Install the ldapc++ library" + cd "${BUILD_DIR}/contrib/ldapc++" || die + emake DESTDIR="${D}" libexecdir="${EPREFIX}/usr/$(get_libdir)/openldap" install + cd "${S}"/contrib/ldapc++ || die + newdoc README ldapc++-README + fi + + if use smbkrb5passwd ; then + einfo "Install the smbk5pwd module" + cd "${S}/contrib/slapd-modules/smbk5pwd" || die + emake DESTDIR="${D}" \ + LDAP_BUILD="${BUILD_DIR}" \ + libexecdir="${EPREFIX}/usr/$(get_libdir)/openldap" install + newdoc README smbk5pwd-README + fi + + if use overlays ; then + einfo "Install the samba4 module" + cd "${S}/contrib/slapd-modules/samba4" || die + emake DESTDIR="${D}" \ + LDAP_BUILD="${BUILD_DIR}" \ + libexecdir="/usr/$(get_libdir)/openldap" install + newdoc README samba4-README + fi + + einfo "Installing contrib modules" + cd "${S}/contrib/slapd-modules" || die + for l in */*.la */*/*.la; do + [[ -e ${l} ]] || continue + "${lt}" --mode=install cp ${l} \ + "${ED}"/usr/$(get_libdir)/openldap/openldap || \ + die "installing ${l} failed" + done + + dodoc "${FILESDIR}"/DB_CONFIG.fast.example + docinto contrib + doman */*.5 + #newdoc acl/README* + newdoc addpartial/README addpartial-README + newdoc allop/README allop-README + newdoc allowed/README allowed-README + newdoc autogroup/README autogroup-README + newdoc dsaschema/README dsaschema-README + newdoc passwd/README passwd-README + cd "${S}/contrib/slapi-plugins" || die + insinto /usr/$(get_libdir)/openldap/openldap + doins */*.so + docinto contrib + newdoc addrdnvalues/README addrdnvalues-README + + insinto /etc/openldap/schema + newins "${DISTDIR}"/${BIS_P} ${BIS_PN} + + docinto back-sock ; dodoc "${S}"/servers/slapd/back-sock/searchexample* + docinto back-shell ; dodoc "${S}"/servers/slapd/back-shell/searchexample* + docinto back-perl ; dodoc "${S}"/servers/slapd/back-perl/SampleLDAP.pm + + dosbin "${S}"/contrib/slapd-tools/statslog + newdoc "${S}"/contrib/slapd-tools/README README.statslog + fi + + if ! use static-libs ; then + find "${ED}" \( -name '*.a' -o -name '*.la' \) -delete || die + fi +} + +multilib_src_install_all() { + dodoc ANNOUNCEMENT CHANGES COPYRIGHT README + docinto rfc ; dodoc doc/rfc/*.txt +} + +pkg_preinst() { + # keep old libs if any + preserve_old_lib /usr/$(get_libdir)/{liblber,libldap_r,liblber}-2.3$(get_libname 0) + # bug 440470, only display the getting started help there was no openldap before, + # or we are going to a non-minimal build + ! has_version net-nds/openldap || has_version 'net-nds/openldap[minimal]' + OPENLDAP_PRINT_MESSAGES=$((! $?)) +} + +pkg_postinst() { + if ! use minimal ; then + # You cannot build SSL certificates during src_install that will make + # binary packages containing your SSL key, which is both a security risk + # 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.* + 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." + fi + + if use prefix; then + # Warn about prefix issues with slapd + eerror "slapd might NOT be usable on Prefix systems as it requires root privileges" + eerror "to start up, and requires that certain files directories be owned by" + eerror "ldap:ldap. As Prefix does not support changing ownership of files and" + eerror "directories, you will have to manually fix this yourself." + fi + + # These lines force the permissions of various content to be correct + if [[ -d "${EROOT}"/var/run/openldap ]]; then + use prefix || { chown ldap:ldap "${EROOT}"/var/run/openldap || die; } + chmod 0755 "${EROOT}"/var/run/openldap || die + fi + 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 + elog "Getting started using OpenLDAP? There is some documentation available:" + elog "Gentoo Guide to OpenLDAP Authentication" + elog "(https://wiki.gentoo.org/wiki/Centralized_authentication_using_OpenLDAP)" + elog "---" + elog "An example file for tuning BDB backends with openldap is" + elog "DB_CONFIG.fast.example in /usr/share/doc/${PF}/" + fi + + preserve_old_lib_notify /usr/$(get_libdir)/{liblber,libldap,libldap_r}-2.3$(get_libname 0) +} -- cgit v1.2.3