summaryrefslogtreecommitdiff
path: root/net-nds
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-12-24 14:11:38 +0000
committerV3n3RiX <venerix@redcorelinux.org>2018-12-24 14:11:38 +0000
commitde49812990871e1705b64051c35161d5e6400269 (patch)
tree5e1e8fcb0ff4579dbd22a1bfee28a6b97dc8aaeb /net-nds
parent536c3711867ec947c1738f2c4b96f22e4863322d (diff)
gentoo resync : 24.12.2018
Diffstat (limited to 'net-nds')
-rw-r--r--net-nds/Manifest.gzbin3244 -> 3244 bytes
-rw-r--r--net-nds/ldapvi/Manifest2
-rw-r--r--net-nds/ldapvi/metadata.xml5
-rw-r--r--net-nds/openldap/Manifest5
-rw-r--r--net-nds/openldap/openldap-2.4.44-r1.ebuild848
-rw-r--r--net-nds/openldap/openldap-2.4.44.ebuild825
-rw-r--r--net-nds/openldap/openldap-2.4.45.ebuild4
-rw-r--r--net-nds/yp-tools/Manifest2
-rw-r--r--net-nds/yp-tools/yp-tools-4.2.3.ebuild43
9 files changed, 50 insertions, 1684 deletions
diff --git a/net-nds/Manifest.gz b/net-nds/Manifest.gz
index 9f86a5ce750a..77c4dd2853ee 100644
--- a/net-nds/Manifest.gz
+++ b/net-nds/Manifest.gz
Binary files differ
diff --git a/net-nds/ldapvi/Manifest b/net-nds/ldapvi/Manifest
index f87559482b5d..3dff2a578aa1 100644
--- a/net-nds/ldapvi/Manifest
+++ b/net-nds/ldapvi/Manifest
@@ -1,3 +1,3 @@
DIST ldapvi-1.7_p20101214.tar.bz2 1490491 BLAKE2B 21bb7b6113e89ce848e7a8efcec063dbfe9c32331c1125456a96dc6edc4e09d17245307a041a7d7804fac20bcce5b38677d719fb53d993fb874134bbd4d4df19 SHA512 2d2a744a36364793f406f37ecf6e546914d697457dec37b81544f4979f4c692756b2a1c3ea6fcbaba5e3238b2bf758ab3e0bd9a9a0794c4da734d65286bd5925
EBUILD ldapvi-1.7_p20101214.ebuild 931 BLAKE2B 45ce069e6a4a5411ba96c1bb2aceb0553b375050d193afd85dec40aa5484f8b5bd712fb398a0bd0e9d5992c6b7a1699948af56ef221154146549ce3cc3df9da5 SHA512 f25907d10aa79f446109e4137c922c175f98c2da3969ada4f029c11e5ada65a9d6097aab1edb01622ac428ae3b210c039bdd7daee2d874f4fdd145b59a3bec25
-MISC metadata.xml 474 BLAKE2B 45e25e966ab1b5bf2a4915bc8273a06bceab035e5abeccf8261677d187a8aab25390e65c473a0b1d0dd125ed6a241a4aef4a208c5373af0f5f62fdb15cfbf31a SHA512 840afe9dd11eeda2b3d29387b2043c6973deaad32ffd8f70ccde46eae0dbd1d09a179a6e29cb61e60a0c9ae0bfb13b96298be4cac02a97f444550fadcc34ea9c
+MISC metadata.xml 398 BLAKE2B fb1a77824b81f94e37ef571fef7fd5988eab6c0489dfe57b1dc42179d7e7a6cf800d9770bbd1d8d093a6646bf7a5e7bd9d3d6db5c83a6c3efc9e3d214f1f8433 SHA512 a2addb83fe45dd3d48f6f76d28c0b42f810f14f2ee6de5cbf4165fb6641c3ae2c9dc20ba634a6d6e6bd8dea8457939c479d32bea54d549dbe267808b53b3cdd9
diff --git a/net-nds/ldapvi/metadata.xml b/net-nds/ldapvi/metadata.xml
index 9a74198dc6b2..4b38083d2f26 100644
--- a/net-nds/ldapvi/metadata.xml
+++ b/net-nds/ldapvi/metadata.xml
@@ -1,10 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <maintainer type="person">
- <email>xmw@gentoo.org</email>
- <name>Michael Weber</name>
- </maintainer>
+ <!-- maintainer-needed -->
<longdescription lang="en">
Text based LDAP client which uses your standard editor for viewing and
changing entries.
diff --git a/net-nds/openldap/Manifest b/net-nds/openldap/Manifest
index 1d72363bfe26..0edb5c5e761c 100644
--- a/net-nds/openldap/Manifest
+++ b/net-nds/openldap/Manifest
@@ -21,10 +21,7 @@ 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.44.tgz 5658830 BLAKE2B 0d9101bbc159f78f23ffc5db78943dd602610650cda166a2920c4acba502c04d4a96968b9e7f146fe1dd87b677d5da6513500b57ec42b92f9991d577b3a4ed46 SHA512 132eb81798f59a364c9246d08697e1c7ebb6c2c3b983f786b14ec0233df09696cbad33a1f35f3076348b5efb77665a076ab854a24122c31e8b58310b7c7fd136
DIST openldap-2.4.45.tgz 5672845 BLAKE2B e1f97553482a2e8630b62bc0f439af2484f1a2349a1a077382a124354424fe510ab55f32c073565b142d0c9318870fe31a2652268ebabd97d3afd8c833bc7aab SHA512 1c9fc84efed8998f107ce6e1c6be3f5466388241afdca0cb3847720c9def0bc263a2dbc15bf0f9112d1b4c391fd01e8531a4fb08c5532c30fb86924c08daedab
DIST rfc2307bis.schema-20140524 12262 BLAKE2B 98031f49e9bde1e4821e637af3382364d8344ed7017649686a088070d96a632dffa6c661552352656b1b159c0fd962965580069a64c7f3d5bb6a3ed75f60fd99 SHA512 83b89a1deeefc8566b97e7e865b9b6d04541099cbdf719e24538a7d27d61b6209e87ab9003a9f140bd9afd018ec569e71721e3a24090e1902c8b6659d2ba103e
-EBUILD openldap-2.4.44-r1.ebuild 27095 BLAKE2B 98571b53fb80a37fc47e7649500c569ac5d1d81dcf58d676ea6457184df7cedb7ec11f4e7aa93167fd6d3394e26c8df43d62ecd513dcd36d5da2b5aac04776b8 SHA512 838464d2f7be0776800e5575d0daf5dbdd7010499b8815a7dee654c5f76663c94232c474aa5f9d5858d251a5c7ac5269ae82dade5b1140d99bd2725a6b901065
-EBUILD openldap-2.4.44.ebuild 26424 BLAKE2B d53202f60ca38acd154c966cea6278af456be8fe93665d21b7d84d58d9efadd5365e150dab285382158c1ae110eb1402769130fc5717e0d3cffbda5442a4f6aa SHA512 a46b7b14c437d5326fffb5ca27c582dea3602360edb771aab389f97dcfe25b4d3e950ea2c27677c94ba5c50fdde80740271f1f5ec6e9f295d413f4a602d2a1ab
-EBUILD openldap-2.4.45.ebuild 27972 BLAKE2B cfb972518f219e88da531a0c324e61328a0a19aea5a50e4787eaea05603015fbc453d868dd284c0de91a03bddb6a3a3b5280216c489abd5db5369c431e81b2e7 SHA512 92f0ca3170e0ce040a31bff5769ebc05945aafa63c29a3b2f1a54190d04ac0bf061335abbede2bee6f24ef1c507b920185eb63cdd17a16906661aea480bc1c0e
+EBUILD openldap-2.4.45.ebuild 27958 BLAKE2B 41e3b6e20ad966c68f2422a077fb0c351eb3cee52e1b0c584027328416ce0fc9e1eee507297d0445b4af12550ef10bfa349fcf376102b15759c6dc41e71588fb SHA512 784bff08fb252983095839ade87a247ed978b93ee13cf345a429993ed905f59c720509920ad265f44ef65187ad7643ba7418fcf7ceb0a6d02f43ff661244e3d5
MISC metadata.xml 922 BLAKE2B f99c4b3703f1a22dccbc0bbb109d11ba747c61229ebc811b036784dee829c4f7ce4bd85d4f5b8d7780cf20194d5175511129b9256416eea7daf4094e20d8c1a7 SHA512 fc9eb245cde878a93e08b8213f58b829266b2171ee73a74a39b47e700e506225da36e7d51952586f3d97ad6e0a3b3792fa59b5620bad0749afc87b8d59678ff9
diff --git a/net-nds/openldap/openldap-2.4.44-r1.ebuild b/net-nds/openldap/openldap-2.4.44-r1.ebuild
deleted file mode 100644
index 9a2496805c41..000000000000
--- a/net-nds/openldap/openldap-2.4.44-r1.ebuild
+++ /dev/null
@@ -1,848 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-inherit db-use eutils flag-o-matic multilib multilib-minimal ssl-cert versionator toolchain-funcs autotools user systemd
-
-BIS_PN=rfc2307bis.schema
-BIS_PV=20140524
-BIS_P="${BIS_PN}-${BIS_PV}"
-
-DESCRIPTION="LDAP suite of application and development tools"
-HOMEPAGE="http://www.OpenLDAP.org/"
-
-# mirrors are mostly not working, using canonical URI
-SRC_URI="ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release/${P}.tgz
- mirror://gentoo/${BIS_P}"
-
-LICENSE="OPENLDAP GPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x86-solaris"
-
-IUSE_DAEMON="crypt samba slp 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_CONTRIB="smbkrb5passwd kerberos kinit pbkdf2"
-IUSE_CONTRIB="${IUSE_CONTRIB} -cxx"
-IUSE="${IUSE_DAEMON} ${IUSE_BACKEND} ${IUSE_OVERLAY} ${IUSE_OPTIONAL} ${IUSE_CONTRIB}"
-
-REQUIRED_USE="cxx? ( sasl )
- ?? ( gnutls libressl )
- pbkdf2? ( ssl )"
-
-# always list newer first
-# Do not add any AGPL-3 BDB here!
-# See bug 525110, comment 15.
-# Advanced usage: OPENLDAP_BDB_SLOTS in the environment can be used to force a slot during build.
-BDB_SLOTS="${OPENLDAP_BDB_SLOTS:=5.3 5.1 4.8 4.7 4.6 4.5 4.4}"
-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="
- ssl? (
- !gnutls? (
- !libressl? ( >=dev-libs/openssl-1.0.1h-r2:0=[${MULTILIB_USEDEP}] )
- )
- gnutls? ( >=net-libs/gnutls-2.12.23-r6[${MULTILIB_USEDEP}]
- libressl? ( dev-libs/libressl[${MULTILIB_USEDEP}] )
- >=dev-libs/libgcrypt-1.5.3:0[${MULTILIB_USEDEP}] ) )
- sasl? ( dev-libs/cyrus-sasl:= )
- !minimal? (
- sys-devel/libtool
- sys-libs/e2fsprogs-libs
- >=dev-db/lmdb-0.9.18:=
- 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 )
- )
- berkdb? (
- <sys-libs/db-6.0:=
- || ( ${BDB_PKGS} )
- )
- smbkrb5passwd? (
- !libressl? ( dev-libs/openssl:0= )
- libressl? ( dev-libs/libressl )
- kerberos? ( app-crypt/heimdal )
- )
- kerberos? (
- virtual/krb5
- kinit? ( !app-crypt/heimdal )
- )
- cxx? ( dev-libs/cyrus-sasl:= )
- )"
-DEPEND="${CDEPEND}
- sys-apps/groff"
-RDEPEND="${CDEPEND}
- selinux? ( sec-policy/selinux-ldap )
-"
-# for tracking versions
-OPENLDAP_VERSIONTAG=".version-tag"
-OPENLDAP_DEFAULTDIR_VERSIONTAG="/var/lib/openldap-data"
-
-MULTILIB_WRAPPED_HEADERS=(
- # USE=cxx
- /usr/include/LDAPAsynConnection.h
- /usr/include/LDAPAttrType.h
- /usr/include/LDAPAttribute.h
- /usr/include/LDAPAttributeList.h
- /usr/include/LDAPConnection.h
- /usr/include/LDAPConstraints.h
- /usr/include/LDAPControl.h
- /usr/include/LDAPControlSet.h
- /usr/include/LDAPEntry.h
- /usr/include/LDAPEntryList.h
- /usr/include/LDAPException.h
- /usr/include/LDAPExtResult.h
- /usr/include/LDAPMessage.h
- /usr/include/LDAPMessageQueue.h
- /usr/include/LDAPModList.h
- /usr/include/LDAPModification.h
- /usr/include/LDAPObjClass.h
- /usr/include/LDAPRebind.h
- /usr/include/LDAPRebindAuth.h
- /usr/include/LDAPReferenceList.h
- /usr/include/LDAPResult.h
- /usr/include/LDAPSaslBindResult.h
- /usr/include/LDAPSchema.h
- /usr/include/LDAPSearchReference.h
- /usr/include/LDAPSearchResult.h
- /usr/include/LDAPSearchResults.h
- /usr/include/LDAPUrl.h
- /usr/include/LDAPUrlList.h
- /usr/include/LdifReader.h
- /usr/include/LdifWriter.h
- /usr/include/SaslInteraction.h
- /usr/include/SaslInteractionHandler.h
- /usr/include/StringList.h
- /usr/include/TlsOptions.h
-)
-
-openldap_filecount() {
- local dir="$1"
- find "${dir}" -type f ! -name '.*' ! -name 'DB_CONFIG*' | wc -l
-}
-
-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)"
- fi
- openldap_datadirs="${openldap_datadirs} ${OPENLDAP_DEFAULTDIR_VERSIONTAG}"
-
- einfo
- einfo "Scanning datadir(s) from slapd.conf and"
- einfo "the default installdir for Versiontags"
- einfo "(${OPENLDAP_DEFAULTDIR_VERSIONTAG} may appear twice)"
- einfo
-
- # 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
- einfo "- Checking ${each}..."
- if [ -r ${CURRENT_TAG} ] ; then
- # yey, we have one :)
- einfo " Found Versiontag in ${each}"
- 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}`
-
- [ $(openldap_filecount ${CURRENT_TAGDIR}) -gt 0 ] && have_files=1
-
- # are we on the same branch?
- 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!"
- echo
- openldap_upgrade_howto
- else
- einfo " No real problem, seems there's no database."
- fi
- else
- einfo " Versiontag is fine here :)"
- fi
- else
- einfo " Non-tagged dir ${each}"
- [ $(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
-
- eerror
- eerror "Your OpenLDAP Installation has a non tagged datadir that"
- eerror "possibly contains a database at ${CURRENT_TAGDIR}"
- eerror
- eerror "Please export data if any entered and empty or remove"
- eerror "the directory, installation has been stopped so you"
- eerror "can take required action"
- eerror
- eerror "For a HOWTO on exporting the data, see instructions in the ebuild"
- eerror
- openldap_upgrade_howto
- die "Please move the datadir ${CURRENT_TAGDIR} away"
- fi
- fi
- einfo
- fi
- done
- [ "${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
- 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
- NEWVER="$(db_findver "=sys-libs/db-${bdb_slot}*")"
- [[ -n "$NEWVER" ]] && break
- done
- fi
- local fail=0
- if [ -z "${OLDVER}" -a -z "${NEWVER}" ]; then
- :
- # Nothing wrong here.
- elif [ -z "${OLDVER}" -a -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
- 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
- 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
- fi
-
- echo
- einfo
- einfo "All datadirs are fine, proceeding with merge now..."
- einfo
-}
-
-openldap_upgrade_howto() {
- eerror
- eerror "A (possible old) installation of OpenLDAP was detected,"
- eerror "installation will not proceed for now."
- eerror
- eerror "As major version upgrades can corrupt your database,"
- eerror "you need to dump your database and re-create it afterwards."
- eerror
- eerror "Additionally, rebuilding against different major versions of the"
- eerror "sys-libs/db libraries will cause your database to be inaccessible."
- eerror ""
- d="$(date -u +%s)"
- l="/root/ldapdump.${d}"
- i="${l}.raw"
- eerror " 1. /etc/init.d/slapd stop"
- eerror " 2. slapcat -l ${i}"
- eerror " 3. egrep -v '^(entry|context)CSN:' <${i} >${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
-
- # The user/group are only used for running daemons which are
- # disabled in minimal builds, so elide the accounts too.
- if ! use minimal ; then
- enewgroup ldap 439
- enewuser ldap 439 -1 /usr/$(get_libdir)/openldap ldap
- fi
-}
-
-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
-
- epatch \
- "${FILESDIR}"/${PN}-2.2.14-perlthreadsfix.patch \
- "${FILESDIR}"/${PN}-2.4.15-ppolicy.patch
-
- # 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.17-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
-
- # unbundle lmdb
- epatch "${FILESDIR}"/${PN}-2.4.42-mdb-unbundle.patch
- rm -rf "${S}"/libraries/liblmdb
-
- cd "${S}"/build || die
- 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"
-
- # wrong assumption that /bin/sh is /bin/bash
- sed -i \
- -e 's|/bin/sh|/bin/bash|g' \
- "${S}"/tests/scripts/* || die "sed failed"
-
- cd "${S}" || die
-
- AT_NOEAUTOMAKE=yes eautoreconf
-}
-
-build_contrib_module() {
- # <dir> <sources> <outputname>
- cd "${S}/contrib/slapd-modules/$1" || die
- einfo "Compiling contrib-module: $3"
- # Make sure it's uppercase
- local define_name="$(echo "SLAPD_OVER_${1}" | LC_ALL=C tr '[:lower:]' '[:upper:]')"
- "${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"
-}
-
-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 )
- 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"
- # We need to include the slotted db.h dir for FreeBSD
- append-cppflags -I${DBINCLUDE}
- else
- myconf+=( --disable-bdb --disable-hdb )
- fi
- 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)
- $(use_enable 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-bdb
- --disable-hdb
- --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 proctitle shared; do
- myconf+=( --enable-${basicflag} )
- done
-
- tc-export AR CC CXX
- 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
- cd "${BUILD_DIR}/contrib/ldapc++" || die
-
- 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}"
-}
-
-multilib_src_compile() {
- tc-export AR CC CXX
- emake CC="${CC}" AR="${AR}" SHELL="${EPREFIX}"/bin/bash
- 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
- cd "${BUILD_DIR}/contrib/ldapc++" || die
- emake \
- CC="${CC}" CXX="${CXX}"
- fi
-
- if use smbkrb5passwd ; then
- einfo "Building contrib-module: smbk5pwd"
- cd "${S}/contrib/slapd-modules/smbk5pwd" || die
-
- 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"
- fi
-
- if use overlays ; then
- einfo "Building contrib-module: samba4"
- cd "${S}/contrib/slapd-modules/samba4" || die
-
- emake \
- LDAP_BUILD="${BUILD_DIR}" \
- CC="${CC}" libexecdir="/usr/$(get_libdir)/openldap"
- fi
-
- if use kerberos ; then
- if use kinit ; then
- build_contrib_module "kinit" "kinit.c" "kinit"
- fi
- cd "${S}/contrib/slapd-modules/passwd" || die
- 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"
- fi
-
- if use pbkdf2; then
- cd "${S}/contrib/slapd-modules/passwd/pbkdf2" || die
- 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"
- fi
-
- # We could build pw-radius if GNURadius would install radlib.h
- cd "${S}/contrib/slapd-modules/passwd" || die
- 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"
- #build_contrib_module "nssov" "nssov.c" "nssov-overlay" RESO:LATER
- build_contrib_module "trace" "trace.c" "trace"
- # build slapi-plugins
- cd "${S}/contrib/slapi-plugins/addrdnvalues" || die
- 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"
-
- fi
-}
-
-multilib_src_test() {
- if multilib_is_native_abi; then
- cd tests || die
- emake tests || die "make tests failed"
- fi
-}
-
-multilib_src_install() {
- local lt="${BUILD_DIR}/libtool"
- emake DESTDIR="${D}" SHELL="${EPREFIX}"/bin/bash 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}"
- 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
- 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
- systemd_newtmpfilesd "${FILESDIR}"/slapd.tmpfilesd slapd.conf
-
- # If built without SLP, we don't need to be before avahi
- use slp \
- || sed -i \
- -e '/before/{s/avahi-daemon//g}' \
- "${ED}"etc/init.d/slapd
-
- 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
-
- use static-libs || prune_libtool_files --all
-}
-
-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
- 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
- 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)
-}
diff --git a/net-nds/openldap/openldap-2.4.44.ebuild b/net-nds/openldap/openldap-2.4.44.ebuild
deleted file mode 100644
index 6e0599b9c969..000000000000
--- a/net-nds/openldap/openldap-2.4.44.ebuild
+++ /dev/null
@@ -1,825 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-inherit db-use eutils flag-o-matic multilib multilib-minimal ssl-cert versionator toolchain-funcs autotools user systemd
-
-BIS_PN=rfc2307bis.schema
-BIS_PV=20140524
-BIS_P="${BIS_PN}-${BIS_PV}"
-
-DESCRIPTION="LDAP suite of application and development tools"
-HOMEPAGE="http://www.OpenLDAP.org/"
-
-# mirrors are mostly not working, using canonical URI
-SRC_URI="ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release/${P}.tgz
- mirror://gentoo/${BIS_P}"
-
-LICENSE="OPENLDAP GPL-2"
-SLOT="0"
-KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 s390 ~sh sparc x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x86-solaris"
-
-IUSE_DAEMON="crypt samba slp 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_CONTRIB="smbkrb5passwd kerberos kinit"
-IUSE_CONTRIB="${IUSE_CONTRIB} -cxx"
-IUSE="${IUSE_DAEMON} ${IUSE_BACKEND} ${IUSE_OVERLAY} ${IUSE_OPTIONAL} ${IUSE_CONTRIB}"
-
-REQUIRED_USE="cxx? ( sasl )
- ?? ( gnutls libressl )"
-
-# always list newer first
-# Do not add any AGPL-3 BDB here!
-# See bug 525110, comment 15.
-# Advanced usage: OPENLDAP_BDB_SLOTS in the environment can be used to force a slot during build.
-BDB_SLOTS="${OPENLDAP_BDB_SLOTS:=5.3 5.1 4.8 4.7 4.6 4.5 4.4}"
-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="
- ssl? (
- !gnutls? (
- !libressl? ( >=dev-libs/openssl-1.0.1h-r2:0=[${MULTILIB_USEDEP}] )
- )
- gnutls? ( >=net-libs/gnutls-2.12.23-r6[${MULTILIB_USEDEP}]
- libressl? ( dev-libs/libressl[${MULTILIB_USEDEP}] )
- >=dev-libs/libgcrypt-1.5.3:0[${MULTILIB_USEDEP}] ) )
- sasl? ( dev-libs/cyrus-sasl:= )
- !minimal? (
- sys-devel/libtool
- sys-libs/e2fsprogs-libs
- >=dev-db/lmdb-0.9.18:=
- 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 )
- )
- berkdb? (
- <sys-libs/db-6.0:=
- || ( ${BDB_PKGS} )
- )
- smbkrb5passwd? (
- !libressl? ( dev-libs/openssl:0= )
- libressl? ( dev-libs/libressl )
- kerberos? ( app-crypt/heimdal )
- )
- kerberos? (
- virtual/krb5
- kinit? ( !app-crypt/heimdal )
- )
- cxx? ( dev-libs/cyrus-sasl:= )
- )"
-DEPEND="${CDEPEND}
- sys-apps/groff"
-RDEPEND="${CDEPEND}
- selinux? ( sec-policy/selinux-ldap )
-"
-# for tracking versions
-OPENLDAP_VERSIONTAG=".version-tag"
-OPENLDAP_DEFAULTDIR_VERSIONTAG="/var/lib/openldap-data"
-
-MULTILIB_WRAPPED_HEADERS=(
- # USE=cxx
- /usr/include/LDAPAsynConnection.h
- /usr/include/LDAPAttrType.h
- /usr/include/LDAPAttribute.h
- /usr/include/LDAPAttributeList.h
- /usr/include/LDAPConnection.h
- /usr/include/LDAPConstraints.h
- /usr/include/LDAPControl.h
- /usr/include/LDAPControlSet.h
- /usr/include/LDAPEntry.h
- /usr/include/LDAPEntryList.h
- /usr/include/LDAPException.h
- /usr/include/LDAPExtResult.h
- /usr/include/LDAPMessage.h
- /usr/include/LDAPMessageQueue.h
- /usr/include/LDAPModList.h
- /usr/include/LDAPModification.h
- /usr/include/LDAPObjClass.h
- /usr/include/LDAPRebind.h
- /usr/include/LDAPRebindAuth.h
- /usr/include/LDAPReferenceList.h
- /usr/include/LDAPResult.h
- /usr/include/LDAPSaslBindResult.h
- /usr/include/LDAPSchema.h
- /usr/include/LDAPSearchReference.h
- /usr/include/LDAPSearchResult.h
- /usr/include/LDAPSearchResults.h
- /usr/include/LDAPUrl.h
- /usr/include/LDAPUrlList.h
- /usr/include/LdifReader.h
- /usr/include/LdifWriter.h
- /usr/include/SaslInteraction.h
- /usr/include/SaslInteractionHandler.h
- /usr/include/StringList.h
- /usr/include/TlsOptions.h
-)
-
-openldap_filecount() {
- local dir="$1"
- find "${dir}" -type f ! -name '.*' ! -name 'DB_CONFIG*' | wc -l
-}
-
-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)"
- fi
- openldap_datadirs="${openldap_datadirs} ${OPENLDAP_DEFAULTDIR_VERSIONTAG}"
-
- einfo
- einfo "Scanning datadir(s) from slapd.conf and"
- einfo "the default installdir for Versiontags"
- einfo "(${OPENLDAP_DEFAULTDIR_VERSIONTAG} may appear twice)"
- einfo
-
- # 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
- einfo "- Checking ${each}..."
- if [ -r ${CURRENT_TAG} ] ; then
- # yey, we have one :)
- einfo " Found Versiontag in ${each}"
- 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}`
-
- [ $(openldap_filecount ${CURRENT_TAGDIR}) -gt 0 ] && have_files=1
-
- # are we on the same branch?
- 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!"
- echo
- openldap_upgrade_howto
- else
- einfo " No real problem, seems there's no database."
- fi
- else
- einfo " Versiontag is fine here :)"
- fi
- else
- einfo " Non-tagged dir ${each}"
- [ $(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
-
- eerror
- eerror "Your OpenLDAP Installation has a non tagged datadir that"
- eerror "possibly contains a database at ${CURRENT_TAGDIR}"
- eerror
- eerror "Please export data if any entered and empty or remove"
- eerror "the directory, installation has been stopped so you"
- eerror "can take required action"
- eerror
- eerror "For a HOWTO on exporting the data, see instructions in the ebuild"
- eerror
- openldap_upgrade_howto
- die "Please move the datadir ${CURRENT_TAGDIR} away"
- fi
- fi
- einfo
- fi
- done
- [ "${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
- 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
- NEWVER="$(db_findver "=sys-libs/db-${bdb_slot}*")"
- [[ -n "$NEWVER" ]] && break
- done
- fi
- local fail=0
- if [ -z "${OLDVER}" -a -z "${NEWVER}" ]; then
- :
- # Nothing wrong here.
- elif [ -z "${OLDVER}" -a -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
- 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
- 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
- fi
-
- echo
- einfo
- einfo "All datadirs are fine, proceeding with merge now..."
- einfo
-}
-
-openldap_upgrade_howto() {
- eerror
- eerror "A (possible old) installation of OpenLDAP was detected,"
- eerror "installation will not proceed for now."
- eerror
- eerror "As major version upgrades can corrupt your database,"
- eerror "you need to dump your database and re-create it afterwards."
- eerror
- eerror "Additionally, rebuilding against different major versions of the"
- eerror "sys-libs/db libraries will cause your database to be inaccessible."
- eerror ""
- d="$(date -u +%s)"
- l="/root/ldapdump.${d}"
- i="${l}.raw"
- eerror " 1. /etc/init.d/slapd stop"
- eerror " 2. slapcat -l ${i}"
- eerror " 3. egrep -v '^(entry|context)CSN:' <${i} >${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
-
- # The user/group are only used for running daemons which are
- # disabled in minimal builds, so elide the accounts too.
- if ! use minimal ; then
- enewgroup ldap 439
- enewuser ldap 439 -1 /usr/$(get_libdir)/openldap ldap
- fi
-}
-
-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
-
- epatch \
- "${FILESDIR}"/${PN}-2.2.14-perlthreadsfix.patch \
- "${FILESDIR}"/${PN}-2.4.15-ppolicy.patch
-
- # 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.17-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
-
- # unbundle lmdb
- epatch "${FILESDIR}"/${PN}-2.4.42-mdb-unbundle.patch
- rm -rf "${S}"/libraries/liblmdb
-
- cd "${S}"/build || die
- 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"
-
- # wrong assumption that /bin/sh is /bin/bash
- sed -i \
- -e 's|/bin/sh|/bin/bash|g' \
- "${S}"/tests/scripts/* || die "sed failed"
-
- cd "${S}" || die
-
- AT_NOEAUTOMAKE=yes eautoreconf
-}
-
-build_contrib_module() {
- # <dir> <sources> <outputname>
- cd "${S}/contrib/slapd-modules/$1" || die
- einfo "Compiling contrib-module: $3"
- # Make sure it's uppercase
- local define_name="$(echo "SLAPD_OVER_${1}" | LC_ALL=C tr '[:lower:]' '[:upper:]')"
- "${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"
-}
-
-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 )
- 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"
- # We need to include the slotted db.h dir for FreeBSD
- append-cppflags -I${DBINCLUDE}
- else
- myconf+=( --disable-bdb --disable-hdb )
- fi
- 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)
- $(use_enable 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-bdb
- --disable-hdb
- --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 proctitle shared; do
- myconf+=( --enable-${basicflag} )
- done
-
- tc-export AR CC CXX
- 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
- cd "${BUILD_DIR}/contrib/ldapc++" || die
-
- 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}"
-}
-
-multilib_src_compile() {
- tc-export AR CC CXX
- emake CC="${CC}" AR="${AR}" SHELL="${EPREFIX}"/bin/bash
- 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
- cd "${BUILD_DIR}/contrib/ldapc++" || die
- emake \
- CC="${CC}" CXX="${CXX}"
- fi
-
- if use smbkrb5passwd ; then
- einfo "Building contrib-module: smbk5pwd"
- cd "${S}/contrib/slapd-modules/smbk5pwd" || die
-
- 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"
- fi
-
- if use overlays ; then
- einfo "Building contrib-module: samba4"
- cd "${S}/contrib/slapd-modules/samba4" || die
-
- emake \
- LDAP_BUILD="${BUILD_DIR}" \
- CC="${CC}" libexecdir="/usr/$(get_libdir)/openldap"
- fi
-
- if use kerberos ; then
- if use kinit ; then
- build_contrib_module "kinit" "kinit.c" "kinit"
- fi
- cd "${S}/contrib/slapd-modules/passwd" || die
- 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"
- fi
- # We could build pw-radius if GNURadius would install radlib.h
- cd "${S}/contrib/slapd-modules/passwd" || die
- 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"
- #build_contrib_module "nssov" "nssov.c" "nssov-overlay" RESO:LATER
- build_contrib_module "trace" "trace.c" "trace"
- # build slapi-plugins
- cd "${S}/contrib/slapi-plugins/addrdnvalues" || die
- 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"
-
- fi
-}
-
-multilib_src_test() {
- if multilib_is_native_abi; then
- cd tests || die
- emake tests || die "make tests failed"
- fi
-}
-
-multilib_src_install() {
- local lt="${BUILD_DIR}/libtool"
- emake DESTDIR="${D}" SHELL="${EPREFIX}"/bin/bash 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}"
- 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
- 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
- systemd_newtmpfilesd "${FILESDIR}"/slapd.tmpfilesd slapd.conf
-
- # If built without SLP, we don't need to be before avahi
- use slp \
- || sed -i \
- -e '/before/{s/avahi-daemon//g}' \
- "${ED}"etc/init.d/slapd
-
- 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; do
- "${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
-
- use static-libs || prune_libtool_files --all
-}
-
-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
- 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
- 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)
-}
diff --git a/net-nds/openldap/openldap-2.4.45.ebuild b/net-nds/openldap/openldap-2.4.45.ebuild
index 5e128b5c465f..7f5cd3fc1bd9 100644
--- a/net-nds/openldap/openldap-2.4.45.ebuild
+++ b/net-nds/openldap/openldap-2.4.45.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="5"
@@ -18,7 +18,7 @@ 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-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x86-solaris"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 s390 ~sh sparc x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x86-solaris"
IUSE_DAEMON="crypt samba slp tcpd experimental minimal"
IUSE_BACKEND="+berkdb"
diff --git a/net-nds/yp-tools/Manifest b/net-nds/yp-tools/Manifest
index 20e30d511ef3..513b0ee98c60 100644
--- a/net-nds/yp-tools/Manifest
+++ b/net-nds/yp-tools/Manifest
@@ -1,5 +1,7 @@
AUX domainname.service 165 BLAKE2B b36bb4877585f69503c319743a2e78f62f419852f235498791b007c4477d8622934263e3690cc2ba619d1c8ba925ca682b379720126915e5057210d893027105 SHA512 dc6cc79a1e6636f31706901bec45adc479231c883e149748989c038d4a9e2d3b1e15e3ba45ca7276700c68600cf6489b92bc4ada0c8ba630921a6d8cb8368de6
AUX domainname.service.conf 89 BLAKE2B 22b81d78eb5df449658413dd2b23ceab02376fca3c061e328a3db36f88b3840296db961748679c8df9719dfb6cf3f4fd100ad6ed79916585aa79edbcf27c7577 SHA512 529f85f41e8204cc3dda72eb3c94c81443b8aa9f5af1ce4cab4510cbc42da79a4554d223893f0a968afb4476898b8a74ea061f8e9f40518b3066584ea9c7ad6c
DIST yp-tools-4.2.2.tar.bz2 368673 BLAKE2B ddc0e6ff81042a632713afc201e8195f42346dd557e44770f8e0d48d2d510a5df1b51d9229912214cb6840a6cc97c6bbf8bbbfcac2eac5dbe06596a4fbd875be SHA512 e2856465e650823de87fcf0e7f18c4875b0540f271b3e564b3afe07d0df35dded7f09ecdf2494d099b31a15e098fc5e9065339f19df45c0489ca91a736c3eac9
+DIST yp-tools-4.2.3.tar.gz 195247 BLAKE2B 5e068f6856876dbf55c25030730195222fd331a06b8d57aa8a797a42c90538289a61ea8de1a2fee2d173e3444f76f82d111fc1120c287f90b7dbad1a2be23313 SHA512 2fcdaaeb8af4c3f62aa571a488c04561356681fc18b919ef728cfc1941578870cce74b136959f49e4ab04f988a79252163c1abe30b357788cb0b5faca7b5d147
EBUILD yp-tools-4.2.2-r2.ebuild 802 BLAKE2B 59be1a7cdd2bbf6e94c7129430790eab2bb5c6e2c402bf1e8b0821b3c49ac9de2238d5f9846d8b52d54e7430121860c26ed0136412b8dfdd55a62705916ef446 SHA512 96e0fd567d0101a75d1dd14d384c5c4509ccd1e8c345f76a3690d2c60706e9b72b7cb6c1d3f01c113976701e519263e54b9ec96aed3a6a1f0d31f3e98b03c301
+EBUILD yp-tools-4.2.3.ebuild 858 BLAKE2B db6290edacdb43c16e345359f0355d3e1bf90c64e8e15f312e089ba669e36998419d943aa9f61136fc9555ebf8214909920b53de5a882c2e5fe9cc9785caae20 SHA512 659e13140d5bb706eb39d94e9f1947a0688fee822126dd7059d01a707d80463d7a4747e8cafb17130734bf076aba08544e2810ab635f17f56c77c607b2e73427
MISC metadata.xml 166 BLAKE2B c254f1fb642881aba57637be14fb0a89b10384f91a128feaec3a8c870d76efc2cbacb92caccc0dee2dd19a5ac5eaf8643080dafa05c4e2ac96a68568927e5afd SHA512 a56648c974a1d14dd4c18237532773c72057a13ab90c58b5da04f185e3c12a8bd8d5c21fb06053507f31766291a82dc7d87b34cd65fd94cfe2af7295c813ef84
diff --git a/net-nds/yp-tools/yp-tools-4.2.3.ebuild b/net-nds/yp-tools/yp-tools-4.2.3.ebuild
new file mode 100644
index 000000000000..25fa50172660
--- /dev/null
+++ b/net-nds/yp-tools/yp-tools-4.2.3.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools systemd
+
+DESCRIPTION="Network Information Service tools"
+HOMEPAGE="https://www.thkukuk.de/nis/"
+SRC_URI="https://github.com/thkukuk/yp-tools/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+IUSE="nls"
+
+DEPEND="
+ net-libs/libtirpc:=
+ >=net-libs/libnsl-1.2.0:0="
+RDEPEND="${DEPEND}"
+# always uses libtirpc if present
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_configure () {
+ econf \
+ --disable-static \
+ --sysconfdir="${EPREFIX}"/etc/yp \
+ $(use_enable nls)
+}
+
+src_install() {
+ default
+
+ insinto /etc/yp
+ doins etc/nicknames
+
+ systemd_dounit "${FILESDIR}"/domainname.service
+ systemd_install_serviced "${FILESDIR}"/domainname.service.conf
+}