1 |
commit: d68d4b6c21cf023d7c6a2544bb36fc9a41ab7440 |
2 |
Author: Mikle Kolyada <zlogene <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Feb 12 16:46:25 2020 +0000 |
4 |
Commit: Mikle Kolyada <zlogene <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Feb 12 16:46:25 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d68d4b6c |
7 |
|
8 |
net-nds/openldap: Drop old |
9 |
|
10 |
Package-Manager: Portage-2.3.84, Repoman-2.3.20 |
11 |
Signed-off-by: Mikle Kolyada <zlogene <AT> gentoo.org> |
12 |
|
13 |
net-nds/openldap/Manifest | 1 - |
14 |
net-nds/openldap/openldap-2.4.45.ebuild | 882 -------------------------------- |
15 |
2 files changed, 883 deletions(-) |
16 |
|
17 |
diff --git a/net-nds/openldap/Manifest b/net-nds/openldap/Manifest |
18 |
index ed0cf9a5574..097a02925b8 100644 |
19 |
--- a/net-nds/openldap/Manifest |
20 |
+++ b/net-nds/openldap/Manifest |
21 |
@@ -1,4 +1,3 @@ |
22 |
-DIST openldap-2.4.45.tgz 5672845 BLAKE2B e1f97553482a2e8630b62bc0f439af2484f1a2349a1a077382a124354424fe510ab55f32c073565b142d0c9318870fe31a2652268ebabd97d3afd8c833bc7aab SHA512 1c9fc84efed8998f107ce6e1c6be3f5466388241afdca0cb3847720c9def0bc263a2dbc15bf0f9112d1b4c391fd01e8531a4fb08c5532c30fb86924c08daedab |
23 |
DIST openldap-2.4.48.tgz 5704883 BLAKE2B ef856ff0b22c9187e68e9c09583a176fe4c2ee1f5bfe6b169f03bc0058294170ec4d1aa1b164e28eecd2ef6bafab539c1b942b0bd74e93852205beeaff39aeef SHA512 cf694a415be0bd55cc7f606099da2ed461748efd276561944cd29d7f5a8252a9be799d8778fac2d4fa9f382731eb4ca48c6b85630cb58a3b8249843561ae8feb |
24 |
DIST openldap-2.4.49.tgz 5704723 BLAKE2B ee777588d758f6704b0d38b90feb85b27e2307510a05d1d147324e9958a6f6fc5bc7dd521a1462971c3f707429ad38fab734f508d71fd88b447770e112e844a2 SHA512 99d1943d126b06e62865e31e5825fcff2cb15415f7f85ae4962fa0e7425bc3b58db5b9639150d7b09e3642c80257724c745e47c25ab4fcb1bba0ba771011dd49 |
25 |
DIST rfc2307bis.schema-20140524 12262 BLAKE2B 98031f49e9bde1e4821e637af3382364d8344ed7017649686a088070d96a632dffa6c661552352656b1b159c0fd962965580069a64c7f3d5bb6a3ed75f60fd99 SHA512 83b89a1deeefc8566b97e7e865b9b6d04541099cbdf719e24538a7d27d61b6209e87ab9003a9f140bd9afd018ec569e71721e3a24090e1902c8b6659d2ba103e |
26 |
|
27 |
diff --git a/net-nds/openldap/openldap-2.4.45.ebuild b/net-nds/openldap/openldap-2.4.45.ebuild |
28 |
deleted file mode 100644 |
29 |
index 4d11c27b76e..00000000000 |
30 |
--- a/net-nds/openldap/openldap-2.4.45.ebuild |
31 |
+++ /dev/null |
32 |
@@ -1,882 +0,0 @@ |
33 |
-# Copyright 1999-2020 Gentoo Authors |
34 |
-# Distributed under the terms of the GNU General Public License v2 |
35 |
- |
36 |
-EAPI="5" |
37 |
- |
38 |
-inherit db-use eutils flag-o-matic multilib multilib-minimal preserve-libs ssl-cert versionator toolchain-funcs autotools user systemd |
39 |
- |
40 |
-BIS_PN=rfc2307bis.schema |
41 |
-BIS_PV=20140524 |
42 |
-BIS_P="${BIS_PN}-${BIS_PV}" |
43 |
- |
44 |
-DESCRIPTION="LDAP suite of application and development tools" |
45 |
-HOMEPAGE="http://www.OpenLDAP.org/" |
46 |
- |
47 |
-# mirrors are mostly not working, using canonical URI |
48 |
-SRC_URI="ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release/${P}.tgz |
49 |
- mirror://gentoo/${BIS_P}" |
50 |
- |
51 |
-LICENSE="OPENLDAP GPL-2" |
52 |
-SLOT="0" |
53 |
-KEYWORDS="~alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 s390 ~sh sparc x86 ~ppc-aix ~amd64-linux ~x86-linux ~x86-solaris" |
54 |
- |
55 |
-IUSE_DAEMON="crypt samba slp tcpd experimental minimal" |
56 |
-IUSE_BACKEND="+berkdb" |
57 |
-IUSE_OVERLAY="overlays perl" |
58 |
-IUSE_OPTIONAL="gnutls iodbc sasl ssl odbc debug ipv6 libressl +syslog selinux static-libs" |
59 |
-IUSE_CONTRIB="smbkrb5passwd kerberos kinit pbkdf2 sha2" |
60 |
-IUSE_CONTRIB="${IUSE_CONTRIB} -cxx" |
61 |
-IUSE="${IUSE_DAEMON} ${IUSE_BACKEND} ${IUSE_OVERLAY} ${IUSE_OPTIONAL} ${IUSE_CONTRIB}" |
62 |
- |
63 |
-REQUIRED_USE="cxx? ( sasl ) |
64 |
- pbkdf2? ( ssl )" |
65 |
- |
66 |
-# always list newer first |
67 |
-# Do not add any AGPL-3 BDB here! |
68 |
-# See bug 525110, comment 15. |
69 |
-# Advanced usage: OPENLDAP_BDB_SLOTS in the environment can be used to force a slot during build. |
70 |
-BDB_SLOTS="${OPENLDAP_BDB_SLOTS:=5.3 5.1 4.8 4.7 4.6 4.5 4.4}" |
71 |
-BDB_PKGS='' |
72 |
-for _slot in $BDB_SLOTS; do BDB_PKGS="${BDB_PKGS} sys-libs/db:${_slot}" ; done |
73 |
- |
74 |
-# openssl is needed to generate lanman-passwords required by samba |
75 |
-CDEPEND=" |
76 |
- ssl? ( |
77 |
- !gnutls? ( |
78 |
- !libressl? ( >=dev-libs/openssl-1.0.1h-r2:0=[${MULTILIB_USEDEP}] ) |
79 |
- libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] ) |
80 |
- ) |
81 |
- gnutls? ( |
82 |
- >=net-libs/gnutls-2.12.23-r6:=[${MULTILIB_USEDEP}] |
83 |
- >=dev-libs/libgcrypt-1.5.3:0=[${MULTILIB_USEDEP}] |
84 |
- ) |
85 |
- ) |
86 |
- sasl? ( dev-libs/cyrus-sasl:= ) |
87 |
- !minimal? ( |
88 |
- sys-devel/libtool |
89 |
- sys-libs/e2fsprogs-libs |
90 |
- >=dev-db/lmdb-0.9.18:= |
91 |
- tcpd? ( sys-apps/tcp-wrappers ) |
92 |
- odbc? ( !iodbc? ( dev-db/unixODBC ) |
93 |
- iodbc? ( dev-db/libiodbc ) ) |
94 |
- slp? ( net-libs/openslp ) |
95 |
- perl? ( dev-lang/perl:=[-build(-)] ) |
96 |
- samba? ( |
97 |
- !libressl? ( dev-libs/openssl:0= ) |
98 |
- libressl? ( dev-libs/libressl ) |
99 |
- ) |
100 |
- berkdb? ( |
101 |
- <sys-libs/db-6.0:= |
102 |
- || ( ${BDB_PKGS} ) |
103 |
- ) |
104 |
- smbkrb5passwd? ( |
105 |
- !libressl? ( dev-libs/openssl:0= ) |
106 |
- libressl? ( dev-libs/libressl ) |
107 |
- kerberos? ( app-crypt/heimdal ) |
108 |
- ) |
109 |
- kerberos? ( |
110 |
- virtual/krb5 |
111 |
- kinit? ( !app-crypt/heimdal ) |
112 |
- ) |
113 |
- cxx? ( dev-libs/cyrus-sasl:= ) |
114 |
- )" |
115 |
-DEPEND="${CDEPEND} |
116 |
- sys-apps/groff" |
117 |
-RDEPEND="${CDEPEND} |
118 |
- selinux? ( sec-policy/selinux-ldap ) |
119 |
-" |
120 |
-# for tracking versions |
121 |
-OPENLDAP_VERSIONTAG=".version-tag" |
122 |
-OPENLDAP_DEFAULTDIR_VERSIONTAG="/var/lib/openldap-data" |
123 |
- |
124 |
-MULTILIB_WRAPPED_HEADERS=( |
125 |
- # USE=cxx |
126 |
- /usr/include/LDAPAsynConnection.h |
127 |
- /usr/include/LDAPAttrType.h |
128 |
- /usr/include/LDAPAttribute.h |
129 |
- /usr/include/LDAPAttributeList.h |
130 |
- /usr/include/LDAPConnection.h |
131 |
- /usr/include/LDAPConstraints.h |
132 |
- /usr/include/LDAPControl.h |
133 |
- /usr/include/LDAPControlSet.h |
134 |
- /usr/include/LDAPEntry.h |
135 |
- /usr/include/LDAPEntryList.h |
136 |
- /usr/include/LDAPException.h |
137 |
- /usr/include/LDAPExtResult.h |
138 |
- /usr/include/LDAPMessage.h |
139 |
- /usr/include/LDAPMessageQueue.h |
140 |
- /usr/include/LDAPModList.h |
141 |
- /usr/include/LDAPModification.h |
142 |
- /usr/include/LDAPObjClass.h |
143 |
- /usr/include/LDAPRebind.h |
144 |
- /usr/include/LDAPRebindAuth.h |
145 |
- /usr/include/LDAPReferenceList.h |
146 |
- /usr/include/LDAPResult.h |
147 |
- /usr/include/LDAPSaslBindResult.h |
148 |
- /usr/include/LDAPSchema.h |
149 |
- /usr/include/LDAPSearchReference.h |
150 |
- /usr/include/LDAPSearchResult.h |
151 |
- /usr/include/LDAPSearchResults.h |
152 |
- /usr/include/LDAPUrl.h |
153 |
- /usr/include/LDAPUrlList.h |
154 |
- /usr/include/LdifReader.h |
155 |
- /usr/include/LdifWriter.h |
156 |
- /usr/include/SaslInteraction.h |
157 |
- /usr/include/SaslInteractionHandler.h |
158 |
- /usr/include/StringList.h |
159 |
- /usr/include/TlsOptions.h |
160 |
-) |
161 |
- |
162 |
-openldap_filecount() { |
163 |
- local dir="$1" |
164 |
- find "${dir}" -type f ! -name '.*' ! -name 'DB_CONFIG*' | wc -l |
165 |
-} |
166 |
- |
167 |
-openldap_find_versiontags() { |
168 |
- # scan for all datadirs |
169 |
- openldap_datadirs="" |
170 |
- if [ -f "${EROOT}"/etc/openldap/slapd.conf ]; then |
171 |
- openldap_datadirs="$(awk '{if($1 == "directory") print $2 }' ${EROOT}/etc/openldap/slapd.conf)" |
172 |
- fi |
173 |
- openldap_datadirs="${openldap_datadirs} ${OPENLDAP_DEFAULTDIR_VERSIONTAG}" |
174 |
- |
175 |
- einfo |
176 |
- einfo "Scanning datadir(s) from slapd.conf and" |
177 |
- einfo "the default installdir for Versiontags" |
178 |
- einfo "(${OPENLDAP_DEFAULTDIR_VERSIONTAG} may appear twice)" |
179 |
- einfo |
180 |
- |
181 |
- # scan datadirs if we have a version tag |
182 |
- openldap_found_tag=0 |
183 |
- have_files=0 |
184 |
- for each in ${openldap_datadirs}; do |
185 |
- CURRENT_TAGDIR=${ROOT}`echo ${each} | sed "s:\/::"` |
186 |
- CURRENT_TAG=${CURRENT_TAGDIR}/${OPENLDAP_VERSIONTAG} |
187 |
- if [ -d ${CURRENT_TAGDIR} ] && [ ${openldap_found_tag} == 0 ] ; then |
188 |
- einfo "- Checking ${each}..." |
189 |
- if [ -r ${CURRENT_TAG} ] ; then |
190 |
- # yey, we have one :) |
191 |
- einfo " Found Versiontag in ${each}" |
192 |
- source ${CURRENT_TAG} |
193 |
- if [ "${OLDPF}" == "" ] ; then |
194 |
- eerror "Invalid Versiontag found in ${CURRENT_TAGDIR}" |
195 |
- eerror "Please delete it" |
196 |
- eerror |
197 |
- die "Please kill the invalid versiontag in ${CURRENT_TAGDIR}" |
198 |
- fi |
199 |
- |
200 |
- OLD_MAJOR=`get_version_component_range 2-3 ${OLDPF}` |
201 |
- |
202 |
- [ $(openldap_filecount ${CURRENT_TAGDIR}) -gt 0 ] && have_files=1 |
203 |
- |
204 |
- # are we on the same branch? |
205 |
- if [ "${OLD_MAJOR}" != "${PV:0:3}" ] ; then |
206 |
- ewarn " Versiontag doesn't match current major release!" |
207 |
- if [[ "${have_files}" == "1" ]] ; then |
208 |
- eerror " Versiontag says other major and you (probably) have datafiles!" |
209 |
- echo |
210 |
- openldap_upgrade_howto |
211 |
- else |
212 |
- einfo " No real problem, seems there's no database." |
213 |
- fi |
214 |
- else |
215 |
- einfo " Versiontag is fine here :)" |
216 |
- fi |
217 |
- else |
218 |
- einfo " Non-tagged dir ${each}" |
219 |
- [ $(openldap_filecount ${each}) -gt 0 ] && have_files=1 |
220 |
- if [[ "${have_files}" == "1" ]] ; then |
221 |
- einfo " EEK! Non-empty non-tagged datadir, counting `ls -a ${each} | wc -l` files" |
222 |
- echo |
223 |
- |
224 |
- eerror |
225 |
- eerror "Your OpenLDAP Installation has a non tagged datadir that" |
226 |
- eerror "possibly contains a database at ${CURRENT_TAGDIR}" |
227 |
- eerror |
228 |
- eerror "Please export data if any entered and empty or remove" |
229 |
- eerror "the directory, installation has been stopped so you" |
230 |
- eerror "can take required action" |
231 |
- eerror |
232 |
- eerror "For a HOWTO on exporting the data, see instructions in the ebuild" |
233 |
- eerror |
234 |
- openldap_upgrade_howto |
235 |
- die "Please move the datadir ${CURRENT_TAGDIR} away" |
236 |
- fi |
237 |
- fi |
238 |
- einfo |
239 |
- fi |
240 |
- done |
241 |
- [ "${have_files}" == "1" ] && einfo "DB files present" || einfo "No DB files present" |
242 |
- |
243 |
- # Now we must check for the major version of sys-libs/db linked against. |
244 |
- SLAPD_PATH=${EROOT}/usr/$(get_libdir)/openldap/slapd |
245 |
- if [ "${have_files}" == "1" -a -f "${SLAPD_PATH}" ]; then |
246 |
- OLDVER="$(/usr/bin/ldd ${SLAPD_PATH} \ |
247 |
- | awk '/libdb-/{gsub("^libdb-","",$1);gsub(".so$","",$1);print $1}')" |
248 |
- if use berkdb; then |
249 |
- # find which one would be used |
250 |
- for bdb_slot in $BDB_SLOTS ; do |
251 |
- NEWVER="$(db_findver "=sys-libs/db-${bdb_slot}*")" |
252 |
- [[ -n "$NEWVER" ]] && break |
253 |
- done |
254 |
- fi |
255 |
- local fail=0 |
256 |
- if [ -z "${OLDVER}" -a -z "${NEWVER}" ]; then |
257 |
- : |
258 |
- # Nothing wrong here. |
259 |
- elif [ -z "${OLDVER}" -a -n "${NEWVER}" ]; then |
260 |
- eerror " Your existing version of OpenLDAP was not built against" |
261 |
- eerror " any version of sys-libs/db, but the new one will build" |
262 |
- eerror " against ${NEWVER} and your database may be inaccessible." |
263 |
- echo |
264 |
- fail=1 |
265 |
- elif [ -n "${OLDVER}" -a -z "${NEWVER}" ]; then |
266 |
- eerror " Your existing version of OpenLDAP was built against" |
267 |
- eerror " sys-libs/db:${OLDVER}, but the new one will not be" |
268 |
- eerror " built against any version and your database may be" |
269 |
- eerror " inaccessible." |
270 |
- echo |
271 |
- fail=1 |
272 |
- elif [ "${OLDVER}" != "${NEWVER}" ]; then |
273 |
- eerror " Your existing version of OpenLDAP was built against" |
274 |
- eerror " sys-libs/db:${OLDVER}, but the new one will build against" |
275 |
- eerror " ${NEWVER} and your database would be inaccessible." |
276 |
- echo |
277 |
- fail=1 |
278 |
- fi |
279 |
- [ "${fail}" == "1" ] && openldap_upgrade_howto |
280 |
- fi |
281 |
- |
282 |
- echo |
283 |
- einfo |
284 |
- einfo "All datadirs are fine, proceeding with merge now..." |
285 |
- einfo |
286 |
-} |
287 |
- |
288 |
-openldap_upgrade_howto() { |
289 |
- eerror |
290 |
- eerror "A (possible old) installation of OpenLDAP was detected," |
291 |
- eerror "installation will not proceed for now." |
292 |
- eerror |
293 |
- eerror "As major version upgrades can corrupt your database," |
294 |
- eerror "you need to dump your database and re-create it afterwards." |
295 |
- eerror |
296 |
- eerror "Additionally, rebuilding against different major versions of the" |
297 |
- eerror "sys-libs/db libraries will cause your database to be inaccessible." |
298 |
- eerror "" |
299 |
- d="$(date -u +%s)" |
300 |
- l="/root/ldapdump.${d}" |
301 |
- i="${l}.raw" |
302 |
- eerror " 1. /etc/init.d/slapd stop" |
303 |
- eerror " 2. slapcat -l ${i}" |
304 |
- eerror " 3. egrep -v '^(entry|context)CSN:' <${i} >${l}" |
305 |
- eerror " 4. mv /var/lib/openldap-data/ /var/lib/openldap-data-backup/" |
306 |
- eerror " 5. emerge --update \=net-nds/${PF}" |
307 |
- eerror " 6. etc-update, and ensure that you apply the changes" |
308 |
- eerror " 7. slapadd -l ${l}" |
309 |
- eerror " 8. chown ldap:ldap /var/lib/openldap-data/*" |
310 |
- eerror " 9. /etc/init.d/slapd start" |
311 |
- eerror "10. check that your data is intact." |
312 |
- eerror "11. set up the new replication system." |
313 |
- eerror |
314 |
- if [ "${FORCE_UPGRADE}" != "1" ]; then |
315 |
- die "You need to upgrade your database first" |
316 |
- else |
317 |
- eerror "You have the magical FORCE_UPGRADE=1 in place." |
318 |
- eerror "Don't say you weren't warned about data loss." |
319 |
- fi |
320 |
-} |
321 |
- |
322 |
-pkg_setup() { |
323 |
- if ! use sasl && use cxx ; then |
324 |
- die "To build the ldapc++ library you must emerge openldap with sasl support" |
325 |
- fi |
326 |
- # Bug #322787 |
327 |
- if use minimal && ! has_version "net-nds/openldap" ; then |
328 |
- einfo "No datadir scan needed, openldap not installed" |
329 |
- elif use minimal && has_version 'net-nds/openldap[minimal]' ; then |
330 |
- einfo "Skipping scan for previous datadirs as requested by minimal useflag" |
331 |
- else |
332 |
- openldap_find_versiontags |
333 |
- fi |
334 |
- |
335 |
- # The user/group are only used for running daemons which are |
336 |
- # disabled in minimal builds, so elide the accounts too. |
337 |
- if ! use minimal ; then |
338 |
- enewgroup ldap 439 |
339 |
- enewuser ldap 439 -1 /usr/$(get_libdir)/openldap ldap |
340 |
- fi |
341 |
-} |
342 |
- |
343 |
-src_prepare() { |
344 |
- # ensure correct SLAPI path by default |
345 |
- sed -i -e 's,\(#define LDAPI_SOCK\).*,\1 "'"${EPREFIX}"'/var/run/openldap/slapd.sock",' \ |
346 |
- "${S}"/include/ldap_defaults.h |
347 |
- |
348 |
- epatch "${FILESDIR}"/${PN}-2.4.17-gcc44.patch |
349 |
- |
350 |
- epatch \ |
351 |
- "${FILESDIR}"/${PN}-2.2.14-perlthreadsfix.patch \ |
352 |
- "${FILESDIR}"/${PN}-2.4.15-ppolicy.patch |
353 |
- |
354 |
- # bug #116045 - still present in 2.4.28 |
355 |
- epatch "${FILESDIR}"/${PN}-2.4.35-contrib-smbk5pwd.patch |
356 |
- # bug #408077 - samba4 |
357 |
- epatch "${FILESDIR}"/${PN}-2.4.35-contrib-samba4.patch |
358 |
- |
359 |
- # bug #189817 |
360 |
- epatch "${FILESDIR}"/${PN}-2.4.11-libldap_r.patch |
361 |
- |
362 |
- # bug #233633 |
363 |
- epatch "${FILESDIR}"/${PN}-2.4.45-fix-lmpasswd-gnutls-symbols.patch |
364 |
- |
365 |
- # bug #281495 |
366 |
- epatch "${FILESDIR}"/${PN}-2.4.28-gnutls-gcrypt.patch |
367 |
- |
368 |
- # bug #294350 |
369 |
- epatch "${FILESDIR}"/${PN}-2.4.6-evolution-ntlm.patch |
370 |
- |
371 |
- # unbreak /bin/sh -> dash |
372 |
- epatch "${FILESDIR}"/${PN}-2.4.28-fix-dash.patch |
373 |
- |
374 |
- # bug #420959 |
375 |
- epatch "${FILESDIR}"/${PN}-2.4.31-gcc47.patch |
376 |
- |
377 |
- # bug #622464 |
378 |
- epatch "${FILESDIR}"/${PN}-2.4.45-libressl.patch |
379 |
- |
380 |
- # unbundle lmdb |
381 |
- epatch "${FILESDIR}"/${PN}-2.4.42-mdb-unbundle.patch |
382 |
- rm -rf "${S}"/libraries/liblmdb |
383 |
- |
384 |
- epatch_user |
385 |
- |
386 |
- cd "${S}"/build || die |
387 |
- einfo "Making sure upstream build strip does not do stripping too early" |
388 |
- sed -i.orig \ |
389 |
- -e '/^STRIP/s,-s,,g' \ |
390 |
- top.mk || die "Failed to block stripping" |
391 |
- |
392 |
- # wrong assumption that /bin/sh is /bin/bash |
393 |
- sed -i \ |
394 |
- -e 's|/bin/sh|/bin/bash|g' \ |
395 |
- "${S}"/tests/scripts/* || die "sed failed" |
396 |
- |
397 |
- cd "${S}" || die |
398 |
- |
399 |
- AT_NOEAUTOMAKE=yes eautoreconf |
400 |
-} |
401 |
- |
402 |
-build_contrib_module() { |
403 |
- # <dir> <sources> <outputname> |
404 |
- cd "${S}/contrib/slapd-modules/$1" || die |
405 |
- einfo "Compiling contrib-module: $3" |
406 |
- # Make sure it's uppercase |
407 |
- local define_name="$(echo "SLAPD_OVER_${1}" | LC_ALL=C tr '[:lower:]' '[:upper:]')" |
408 |
- "${lt}" --mode=compile --tag=CC \ |
409 |
- "${CC}" \ |
410 |
- -D${define_name}=SLAPD_MOD_DYNAMIC \ |
411 |
- -I"${BUILD_DIR}"/include \ |
412 |
- -I../../../include -I../../../servers/slapd ${CFLAGS} \ |
413 |
- -o ${2%.c}.lo -c $2 || die "compiling $3 failed" |
414 |
- einfo "Linking contrib-module: $3" |
415 |
- "${lt}" --mode=link --tag=CC \ |
416 |
- "${CC}" -module \ |
417 |
- ${CFLAGS} \ |
418 |
- ${LDFLAGS} \ |
419 |
- -rpath "${EPREFIX}"/usr/$(get_libdir)/openldap/openldap \ |
420 |
- -o $3.la ${2%.c}.lo || die "linking $3 failed" |
421 |
-} |
422 |
- |
423 |
-src_configure() { |
424 |
- # Bug 408001 |
425 |
- use elibc_FreeBSD && append-cppflags -DMDB_DSYNC=O_SYNC -DMDB_FDATASYNC=fsync |
426 |
- |
427 |
- # connectionless ldap per bug #342439 |
428 |
- append-cppflags -DLDAP_CONNECTIONLESS |
429 |
- |
430 |
- multilib-minimal_src_configure |
431 |
-} |
432 |
- |
433 |
-multilib_src_configure() { |
434 |
- local myconf=() |
435 |
- |
436 |
- use debug && myconf+=( $(use_enable debug) ) |
437 |
- |
438 |
- # ICU exists only in the configure, nowhere in the codebase, bug #510858 |
439 |
- export ac_cv_header_unicode_utypes_h=no ol_cv_lib_icu=no |
440 |
- |
441 |
- if ! use minimal && multilib_is_native_abi; then |
442 |
- local CPPFLAGS=${CPPFLAGS} |
443 |
- |
444 |
- # re-enable serverside overlay chains per bug #296567 |
445 |
- # see ldap docs chaper 12.3.1 for details |
446 |
- myconf+=( --enable-ldap ) |
447 |
- |
448 |
- # backends |
449 |
- myconf+=( --enable-slapd ) |
450 |
- if use berkdb ; then |
451 |
- einfo "Using Berkeley DB for local backend" |
452 |
- myconf+=( --enable-bdb --enable-hdb ) |
453 |
- DBINCLUDE=$(db_includedir $BDB_SLOTS) |
454 |
- einfo "Using $DBINCLUDE for sys-libs/db version" |
455 |
- # We need to include the slotted db.h dir for FreeBSD |
456 |
- append-cppflags -I${DBINCLUDE} |
457 |
- else |
458 |
- myconf+=( --disable-bdb --disable-hdb ) |
459 |
- fi |
460 |
- for backend in dnssrv ldap mdb meta monitor null passwd relay shell sock; do |
461 |
- myconf+=( --enable-${backend}=mod ) |
462 |
- done |
463 |
- |
464 |
- myconf+=( $(use_enable perl perl mod) ) |
465 |
- |
466 |
- myconf+=( $(use_enable odbc sql mod) ) |
467 |
- if use odbc ; then |
468 |
- local odbc_lib="unixodbc" |
469 |
- if use iodbc ; then |
470 |
- odbc_lib="iodbc" |
471 |
- append-cppflags -I"${EPREFIX}"/usr/include/iodbc |
472 |
- fi |
473 |
- myconf+=( --with-odbc=${odbc_lib} ) |
474 |
- fi |
475 |
- |
476 |
- # slapd options |
477 |
- myconf+=( |
478 |
- $(use_enable crypt) |
479 |
- $(use_enable slp) |
480 |
- $(use_enable samba lmpasswd) |
481 |
- $(use_enable syslog) |
482 |
- ) |
483 |
- if use experimental ; then |
484 |
- myconf+=( |
485 |
- --enable-dynacl |
486 |
- --enable-aci=mod |
487 |
- ) |
488 |
- fi |
489 |
- for option in aci cleartext modules rewrite rlookups slapi; do |
490 |
- myconf+=( --enable-${option} ) |
491 |
- done |
492 |
- |
493 |
- # slapd overlay options |
494 |
- # Compile-in the syncprov, the others as module |
495 |
- myconf+=( --enable-syncprov=yes ) |
496 |
- use overlays && myconf+=( --enable-overlays=mod ) |
497 |
- |
498 |
- else |
499 |
- myconf+=( |
500 |
- --disable-backends |
501 |
- --disable-slapd |
502 |
- --disable-bdb |
503 |
- --disable-hdb |
504 |
- --disable-mdb |
505 |
- --disable-overlays |
506 |
- --disable-syslog |
507 |
- ) |
508 |
- fi |
509 |
- |
510 |
- # basic functionality stuff |
511 |
- myconf+=( |
512 |
- $(use_enable ipv6) |
513 |
- $(multilib_native_use_with sasl cyrus-sasl) |
514 |
- $(multilib_native_use_enable sasl spasswd) |
515 |
- $(use_enable tcpd wrappers) |
516 |
- ) |
517 |
- |
518 |
- # Some cross-compiling tests don't pan out well. |
519 |
- tc-is-cross-compiler && myconf+=( |
520 |
- --with-yielding-select=yes |
521 |
- ) |
522 |
- |
523 |
- local ssl_lib="no" |
524 |
- if use ssl || ( ! use minimal && use samba ) ; then |
525 |
- ssl_lib="openssl" |
526 |
- use gnutls && ssl_lib="gnutls" |
527 |
- fi |
528 |
- |
529 |
- myconf+=( --with-tls=${ssl_lib} ) |
530 |
- |
531 |
- for basicflag in dynamic local proctitle shared; do |
532 |
- myconf+=( --enable-${basicflag} ) |
533 |
- done |
534 |
- |
535 |
- tc-export AR CC CXX |
536 |
- ECONF_SOURCE=${S} \ |
537 |
- STRIP=/bin/true \ |
538 |
- econf \ |
539 |
- --libexecdir="${EPREFIX}"/usr/$(get_libdir)/openldap \ |
540 |
- $(use_enable static-libs static) \ |
541 |
- "${myconf[@]}" |
542 |
- emake depend |
543 |
-} |
544 |
- |
545 |
-src_configure_cxx() { |
546 |
- # This needs the libraries built by the first build run. |
547 |
- # So we have to run it AFTER the main build, not just after the main |
548 |
- # configure. |
549 |
- local myconf_ldapcpp=( |
550 |
- --with-ldap-includes="${S}"/include |
551 |
- ) |
552 |
- |
553 |
- mkdir -p "${BUILD_DIR}"/contrib/ldapc++ || die |
554 |
- cd "${BUILD_DIR}/contrib/ldapc++" || die |
555 |
- |
556 |
- local LDFLAGS=${LDFLAGS} CPPFLAGS=${CPPFLAGS} |
557 |
- append-ldflags -L"${BUILD_DIR}"/libraries/liblber/.libs \ |
558 |
- -L"${BUILD_DIR}"/libraries/libldap/.libs |
559 |
- append-cppflags -I"${BUILD_DIR}"/include |
560 |
- ECONF_SOURCE=${S}/contrib/ldapc++ \ |
561 |
- econf "${myconf_ldapcpp[@]}" \ |
562 |
- CC="${CC}" \ |
563 |
- CXX="${CXX}" |
564 |
-} |
565 |
- |
566 |
-multilib_src_compile() { |
567 |
- tc-export AR CC CXX |
568 |
- emake CC="${CC}" AR="${AR}" SHELL="${EPREFIX}"/bin/bash |
569 |
- local lt="${BUILD_DIR}/libtool" |
570 |
- export echo="echo" |
571 |
- |
572 |
- if ! use minimal && multilib_is_native_abi ; then |
573 |
- if use cxx ; then |
574 |
- einfo "Building contrib library: ldapc++" |
575 |
- src_configure_cxx |
576 |
- cd "${BUILD_DIR}/contrib/ldapc++" || die |
577 |
- emake \ |
578 |
- CC="${CC}" CXX="${CXX}" |
579 |
- fi |
580 |
- |
581 |
- if use smbkrb5passwd ; then |
582 |
- einfo "Building contrib-module: smbk5pwd" |
583 |
- cd "${S}/contrib/slapd-modules/smbk5pwd" || die |
584 |
- |
585 |
- MY_DEFS="-DDO_SHADOW" |
586 |
- if use samba ; then |
587 |
- MY_DEFS="${MY_DEFS} -DDO_SAMBA" |
588 |
- MY_KRB5_INC="" |
589 |
- fi |
590 |
- if use kerberos ; then |
591 |
- MY_DEFS="${MY_DEFS} -DDO_KRB5" |
592 |
- MY_KRB5_INC="$(krb5-config --cflags)" |
593 |
- fi |
594 |
- |
595 |
- emake \ |
596 |
- DEFS="${MY_DEFS}" \ |
597 |
- KRB5_INC="${MY_KRB5_INC}" \ |
598 |
- LDAP_BUILD="${BUILD_DIR}" \ |
599 |
- CC="${CC}" libexecdir="${EPREFIX}/usr/$(get_libdir)/openldap" |
600 |
- fi |
601 |
- |
602 |
- if use overlays ; then |
603 |
- einfo "Building contrib-module: samba4" |
604 |
- cd "${S}/contrib/slapd-modules/samba4" || die |
605 |
- |
606 |
- emake \ |
607 |
- LDAP_BUILD="${BUILD_DIR}" \ |
608 |
- CC="${CC}" libexecdir="/usr/$(get_libdir)/openldap" |
609 |
- fi |
610 |
- |
611 |
- if use kerberos ; then |
612 |
- if use kinit ; then |
613 |
- build_contrib_module "kinit" "kinit.c" "kinit" |
614 |
- fi |
615 |
- cd "${S}/contrib/slapd-modules/passwd" || die |
616 |
- einfo "Compiling contrib-module: pw-kerberos" |
617 |
- "${lt}" --mode=compile --tag=CC \ |
618 |
- "${CC}" \ |
619 |
- -I"${BUILD_DIR}"/include \ |
620 |
- -I../../../include \ |
621 |
- ${CFLAGS} \ |
622 |
- $(krb5-config --cflags) \ |
623 |
- -DHAVE_KRB5 \ |
624 |
- -o kerberos.lo \ |
625 |
- -c kerberos.c || die "compiling pw-kerberos failed" |
626 |
- einfo "Linking contrib-module: pw-kerberos" |
627 |
- "${lt}" --mode=link --tag=CC \ |
628 |
- "${CC}" -module \ |
629 |
- ${CFLAGS} \ |
630 |
- ${LDFLAGS} \ |
631 |
- -rpath "${EPREFIX}"/usr/$(get_libdir)/openldap/openldap \ |
632 |
- -o pw-kerberos.la \ |
633 |
- kerberos.lo || die "linking pw-kerberos failed" |
634 |
- fi |
635 |
- |
636 |
- if use pbkdf2; then |
637 |
- cd "${S}/contrib/slapd-modules/passwd/pbkdf2" || die |
638 |
- einfo "Compiling contrib-module: pw-pbkdf2" |
639 |
- "${lt}" --mode=compile --tag=CC \ |
640 |
- "${CC}" \ |
641 |
- -I"${BUILD_DIR}"/include \ |
642 |
- -I../../../../include \ |
643 |
- ${CFLAGS} \ |
644 |
- -o pbkdf2.lo \ |
645 |
- -c pw-pbkdf2.c || die "compiling pw-pbkdf2 failed" |
646 |
- einfo "Linking contrib-module: pw-pbkdf2" |
647 |
- "${lt}" --mode=link --tag=CC \ |
648 |
- "${CC}" -module \ |
649 |
- ${CFLAGS} \ |
650 |
- ${LDFLAGS} \ |
651 |
- -rpath "${EPREFIX}"/usr/$(get_libdir)/openldap/openldap \ |
652 |
- -o pw-pbkdf2.la \ |
653 |
- pbkdf2.lo || die "linking pw-pbkdf2 failed" |
654 |
- fi |
655 |
- |
656 |
- if use sha2 ; then |
657 |
- cd "${S}/contrib/slapd-modules/passwd/sha2" || die |
658 |
- einfo "Compiling contrib-module: pw-sha2" |
659 |
- "${lt}" --mode=compile --tag=CC \ |
660 |
- "${CC}" \ |
661 |
- -I"${BUILD_DIR}"/include \ |
662 |
- -I../../../../include \ |
663 |
- ${CFLAGS} \ |
664 |
- -o sha2.lo \ |
665 |
- -c sha2.c || die "compiling pw-sha2 failed" |
666 |
- "${lt}" --mode=compile --tag=CC \ |
667 |
- "${CC}" \ |
668 |
- -I"${BUILD_DIR}"/include \ |
669 |
- -I../../../../include \ |
670 |
- ${CFLAGS} \ |
671 |
- -o slapd-sha2.lo \ |
672 |
- -c slapd-sha2.c || die "compiling pw-sha2 failed" |
673 |
- einfo "Linking contrib-module: pw-sha2" |
674 |
- "${lt}" --mode=link --tag=CC \ |
675 |
- "${CC}" -module \ |
676 |
- ${CFLAGS} \ |
677 |
- ${LDFLAGS} \ |
678 |
- -rpath "${EPREFIX}"/usr/$(get_libdir)/openldap/openldap \ |
679 |
- -o pw-sha2.la \ |
680 |
- sha2.lo slapd-sha2.lo || die "linking pw-sha2 failed" |
681 |
- fi |
682 |
- |
683 |
- # We could build pw-radius if GNURadius would install radlib.h |
684 |
- cd "${S}/contrib/slapd-modules/passwd" || die |
685 |
- einfo "Compiling contrib-module: pw-netscape" |
686 |
- "${lt}" --mode=compile --tag=CC \ |
687 |
- "${CC}" \ |
688 |
- -I"${BUILD_DIR}"/include \ |
689 |
- -I../../../include \ |
690 |
- ${CFLAGS} \ |
691 |
- -o netscape.lo \ |
692 |
- -c netscape.c || die "compiling pw-netscape failed" |
693 |
- einfo "Linking contrib-module: pw-netscape" |
694 |
- "${lt}" --mode=link --tag=CC \ |
695 |
- "${CC}" -module \ |
696 |
- ${CFLAGS} \ |
697 |
- ${LDFLAGS} \ |
698 |
- -rpath "${EPREFIX}"/usr/$(get_libdir)/openldap/openldap \ |
699 |
- -o pw-netscape.la \ |
700 |
- netscape.lo || die "linking pw-netscape failed" |
701 |
- |
702 |
- #build_contrib_module "acl" "posixgroup.c" "posixGroup" # example code only |
703 |
- #build_contrib_module "acl" "gssacl.c" "gss" # example code only, also needs kerberos |
704 |
- build_contrib_module "addpartial" "addpartial-overlay.c" "addpartial-overlay" |
705 |
- build_contrib_module "allop" "allop.c" "overlay-allop" |
706 |
- build_contrib_module "allowed" "allowed.c" "allowed" |
707 |
- build_contrib_module "autogroup" "autogroup.c" "autogroup" |
708 |
- build_contrib_module "cloak" "cloak.c" "cloak" |
709 |
- # build_contrib_module "comp_match" "comp_match.c" "comp_match" # really complex, adds new external deps, questionable demand |
710 |
- build_contrib_module "denyop" "denyop.c" "denyop-overlay" |
711 |
- build_contrib_module "dsaschema" "dsaschema.c" "dsaschema-plugin" |
712 |
- build_contrib_module "dupent" "dupent.c" "dupent" |
713 |
- build_contrib_module "lastbind" "lastbind.c" "lastbind" |
714 |
- # lastmod may not play well with other overlays |
715 |
- build_contrib_module "lastmod" "lastmod.c" "lastmod" |
716 |
- build_contrib_module "noopsrch" "noopsrch.c" "noopsrch" |
717 |
- build_contrib_module "nops" "nops.c" "nops-overlay" |
718 |
- #build_contrib_module "nssov" "nssov.c" "nssov-overlay" RESO:LATER |
719 |
- build_contrib_module "trace" "trace.c" "trace" |
720 |
- # build slapi-plugins |
721 |
- cd "${S}/contrib/slapi-plugins/addrdnvalues" || die |
722 |
- einfo "Building contrib-module: addrdnvalues plugin" |
723 |
- "${CC}" -shared \ |
724 |
- -I"${BUILD_DIR}"/include \ |
725 |
- -I../../../include \ |
726 |
- ${CFLAGS} \ |
727 |
- -fPIC \ |
728 |
- ${LDFLAGS} \ |
729 |
- -o libaddrdnvalues-plugin.so \ |
730 |
- addrdnvalues.c || die "Building libaddrdnvalues-plugin.so failed" |
731 |
- |
732 |
- fi |
733 |
-} |
734 |
- |
735 |
-multilib_src_test() { |
736 |
- if multilib_is_native_abi; then |
737 |
- cd tests || die |
738 |
- emake tests |
739 |
- fi |
740 |
-} |
741 |
- |
742 |
-multilib_src_install() { |
743 |
- local lt="${BUILD_DIR}/libtool" |
744 |
- emake DESTDIR="${D}" SHELL="${EPREFIX}"/bin/bash install |
745 |
- |
746 |
- if ! use minimal && multilib_is_native_abi; then |
747 |
- # openldap modules go here |
748 |
- # TODO: write some code to populate slapd.conf with moduleload statements |
749 |
- keepdir /usr/$(get_libdir)/openldap/openldap/ |
750 |
- |
751 |
- # initial data storage dir |
752 |
- keepdir /var/lib/openldap-data |
753 |
- use prefix || fowners ldap:ldap /var/lib/openldap-data |
754 |
- fperms 0700 /var/lib/openldap-data |
755 |
- |
756 |
- echo "OLDPF='${PF}'" > "${ED}${OPENLDAP_DEFAULTDIR_VERSIONTAG}/${OPENLDAP_VERSIONTAG}" |
757 |
- echo "# do NOT delete this. it is used" >> "${ED}${OPENLDAP_DEFAULTDIR_VERSIONTAG}/${OPENLDAP_VERSIONTAG}" |
758 |
- echo "# to track versions for upgrading." >> "${ED}${OPENLDAP_DEFAULTDIR_VERSIONTAG}/${OPENLDAP_VERSIONTAG}" |
759 |
- |
760 |
- # use our config |
761 |
- rm "${ED}"etc/openldap/slapd.conf |
762 |
- insinto /etc/openldap |
763 |
- newins "${FILESDIR}"/${PN}-2.4.40-slapd-conf slapd.conf |
764 |
- configfile="${ED}"etc/openldap/slapd.conf |
765 |
- |
766 |
- # populate with built backends |
767 |
- ebegin "populate config with built backends" |
768 |
- for x in "${ED}"usr/$(get_libdir)/openldap/openldap/back_*.so; do |
769 |
- einfo "Adding $(basename ${x})" |
770 |
- sed -e "/###INSERTDYNAMICMODULESHERE###$/a# moduleload\t$(basename ${x})" -i "${configfile}" |
771 |
- done |
772 |
- sed -e "s:###INSERTDYNAMICMODULESHERE###$:# modulepath\t${EPREFIX}/usr/$(get_libdir)/openldap/openldap:" -i "${configfile}" |
773 |
- use prefix || fowners root:ldap /etc/openldap/slapd.conf |
774 |
- fperms 0640 /etc/openldap/slapd.conf |
775 |
- cp "${configfile}" "${configfile}".default |
776 |
- eend |
777 |
- |
778 |
- # install our own init scripts and systemd unit files |
779 |
- einfo "Install init scripts" |
780 |
- sed -e "s,/usr/lib/,/usr/$(get_libdir)/," "${FILESDIR}"/slapd-initd-2.4.40-r2 > "${T}"/slapd || die |
781 |
- doinitd "${T}"/slapd |
782 |
- newconfd "${FILESDIR}"/slapd-confd-2.4.28-r1 slapd |
783 |
- |
784 |
- einfo "Install systemd service" |
785 |
- sed -e "s,/usr/lib/,/usr/$(get_libdir)/," "${FILESDIR}"/slapd.service > "${T}"/slapd.service || die |
786 |
- systemd_dounit "${T}"/slapd.service |
787 |
- systemd_install_serviced "${FILESDIR}"/slapd.service.conf |
788 |
- systemd_newtmpfilesd "${FILESDIR}"/slapd.tmpfilesd slapd.conf |
789 |
- |
790 |
- # If built without SLP, we don't need to be before avahi |
791 |
- use slp \ |
792 |
- || sed -i \ |
793 |
- -e '/before/{s/avahi-daemon//g}' \ |
794 |
- "${ED}"etc/init.d/slapd |
795 |
- |
796 |
- if use cxx ; then |
797 |
- einfo "Install the ldapc++ library" |
798 |
- cd "${BUILD_DIR}/contrib/ldapc++" || die |
799 |
- emake DESTDIR="${D}" libexecdir="${EPREFIX}/usr/$(get_libdir)/openldap" install |
800 |
- cd "${S}"/contrib/ldapc++ || die |
801 |
- newdoc README ldapc++-README |
802 |
- fi |
803 |
- |
804 |
- if use smbkrb5passwd ; then |
805 |
- einfo "Install the smbk5pwd module" |
806 |
- cd "${S}/contrib/slapd-modules/smbk5pwd" || die |
807 |
- emake DESTDIR="${D}" \ |
808 |
- LDAP_BUILD="${BUILD_DIR}" \ |
809 |
- libexecdir="${EPREFIX}/usr/$(get_libdir)/openldap" install |
810 |
- newdoc README smbk5pwd-README |
811 |
- fi |
812 |
- |
813 |
- if use overlays ; then |
814 |
- einfo "Install the samba4 module" |
815 |
- cd "${S}/contrib/slapd-modules/samba4" || die |
816 |
- emake DESTDIR="${D}" \ |
817 |
- LDAP_BUILD="${BUILD_DIR}" \ |
818 |
- libexecdir="/usr/$(get_libdir)/openldap" install |
819 |
- newdoc README samba4-README |
820 |
- fi |
821 |
- |
822 |
- einfo "Installing contrib modules" |
823 |
- cd "${S}/contrib/slapd-modules" || die |
824 |
- for l in */*.la */*/*.la; do |
825 |
- [[ -e ${l} ]] || continue |
826 |
- "${lt}" --mode=install cp ${l} \ |
827 |
- "${ED}"usr/$(get_libdir)/openldap/openldap || \ |
828 |
- die "installing ${l} failed" |
829 |
- done |
830 |
- |
831 |
- dodoc "${FILESDIR}"/DB_CONFIG.fast.example |
832 |
- docinto contrib |
833 |
- doman */*.5 |
834 |
- #newdoc acl/README* |
835 |
- newdoc addpartial/README addpartial-README |
836 |
- newdoc allop/README allop-README |
837 |
- newdoc allowed/README allowed-README |
838 |
- newdoc autogroup/README autogroup-README |
839 |
- newdoc dsaschema/README dsaschema-README |
840 |
- newdoc passwd/README passwd-README |
841 |
- cd "${S}/contrib/slapi-plugins" || die |
842 |
- insinto /usr/$(get_libdir)/openldap/openldap |
843 |
- doins */*.so |
844 |
- docinto contrib |
845 |
- newdoc addrdnvalues/README addrdnvalues-README |
846 |
- |
847 |
- insinto /etc/openldap/schema |
848 |
- newins "${DISTDIR}"/${BIS_P} ${BIS_PN} |
849 |
- |
850 |
- docinto back-sock ; dodoc "${S}"/servers/slapd/back-sock/searchexample* |
851 |
- docinto back-shell ; dodoc "${S}"/servers/slapd/back-shell/searchexample* |
852 |
- docinto back-perl ; dodoc "${S}"/servers/slapd/back-perl/SampleLDAP.pm |
853 |
- |
854 |
- dosbin "${S}"/contrib/slapd-tools/statslog |
855 |
- newdoc "${S}"/contrib/slapd-tools/README README.statslog |
856 |
- fi |
857 |
- |
858 |
- use static-libs || prune_libtool_files --all |
859 |
-} |
860 |
- |
861 |
-multilib_src_install_all() { |
862 |
- dodoc ANNOUNCEMENT CHANGES COPYRIGHT README |
863 |
- docinto rfc ; dodoc doc/rfc/*.txt |
864 |
-} |
865 |
- |
866 |
-pkg_preinst() { |
867 |
- # keep old libs if any |
868 |
- preserve_old_lib /usr/$(get_libdir)/{liblber,libldap_r,liblber}-2.3$(get_libname 0) |
869 |
- # bug 440470, only display the getting started help there was no openldap before, |
870 |
- # or we are going to a non-minimal build |
871 |
- ! has_version net-nds/openldap || has_version 'net-nds/openldap[minimal]' |
872 |
- OPENLDAP_PRINT_MESSAGES=$((! $?)) |
873 |
-} |
874 |
- |
875 |
-pkg_postinst() { |
876 |
- if ! use minimal ; then |
877 |
- # You cannot build SSL certificates during src_install that will make |
878 |
- # binary packages containing your SSL key, which is both a security risk |
879 |
- # and a misconfiguration if multiple machines use the same key and cert. |
880 |
- if use ssl; then |
881 |
- install_cert /etc/openldap/ssl/ldap |
882 |
- use prefix || chown ldap:ldap "${EROOT}"etc/openldap/ssl/ldap.* |
883 |
- ewarn "Self-signed SSL certificates are treated harshly by OpenLDAP 2.[12]" |
884 |
- ewarn "Self-signed SSL certificates are treated harshly by OpenLDAP 2.[12]" |
885 |
- ewarn "add 'TLS_REQCERT allow' if you want to use them." |
886 |
- fi |
887 |
- |
888 |
- if use prefix; then |
889 |
- # Warn about prefix issues with slapd |
890 |
- eerror "slapd might NOT be usable on Prefix systems as it requires root privileges" |
891 |
- eerror "to start up, and requires that certain files directories be owned by" |
892 |
- eerror "ldap:ldap. As Prefix does not support changing ownership of files and" |
893 |
- eerror "directories, you will have to manually fix this yourself." |
894 |
- fi |
895 |
- |
896 |
- # These lines force the permissions of various content to be correct |
897 |
- use prefix || chown ldap:ldap "${EROOT}"var/run/openldap |
898 |
- chmod 0755 "${EROOT}"var/run/openldap |
899 |
- use prefix || chown root:ldap "${EROOT}"etc/openldap/slapd.conf{,.default} |
900 |
- chmod 0640 "${EROOT}"etc/openldap/slapd.conf{,.default} |
901 |
- use prefix || chown ldap:ldap "${EROOT}"var/lib/openldap-data |
902 |
- fi |
903 |
- |
904 |
- if has_version 'net-nds/openldap[-minimal]' && ((${OPENLDAP_PRINT_MESSAGES})); then |
905 |
- elog "Getting started using OpenLDAP? There is some documentation available:" |
906 |
- elog "Gentoo Guide to OpenLDAP Authentication" |
907 |
- elog "(https://wiki.gentoo.org/wiki/Centralized_authentication_using_OpenLDAP)" |
908 |
- elog "---" |
909 |
- elog "An example file for tuning BDB backends with openldap is" |
910 |
- elog "DB_CONFIG.fast.example in /usr/share/doc/${PF}/" |
911 |
- fi |
912 |
- |
913 |
- preserve_old_lib_notify /usr/$(get_libdir)/{liblber,libldap,libldap_r}-2.3$(get_libname 0) |
914 |
-} |