Gentoo Archives: gentoo-commits

From: "Robin H. Johnson (robbat2)" <robbat2@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-nds/openldap: ChangeLog openldap-2.3.43-r1.ebuild
Date: Tue, 14 Oct 2008 08:59:47
Message-Id: E1Kpfkk-0000gy-T5@stork.gentoo.org
1 robbat2 08/10/14 08:59:42
2
3 Modified: ChangeLog
4 Added: openldap-2.3.43-r1.ebuild
5 Log:
6 Bug #189817, fix linking of libldap_r with as-needed.
7 (Portage version: 2.2_rc11/cvs/Linux 2.6.27-rc1-10246-gca5de40 x86_64)
8
9 Revision Changes Path
10 1.334 net-nds/openldap/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-nds/openldap/ChangeLog?rev=1.334&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-nds/openldap/ChangeLog?rev=1.334&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-nds/openldap/ChangeLog?r1=1.333&r2=1.334
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/net-nds/openldap/ChangeLog,v
19 retrieving revision 1.333
20 retrieving revision 1.334
21 diff -p -w -b -B -u -u -r1.333 -r1.334
22 --- ChangeLog 3 Sep 2008 18:09:42 -0000 1.333
23 +++ ChangeLog 14 Oct 2008 08:59:42 -0000 1.334
24 @@ -1,6 +1,12 @@
25 # ChangeLog for net-nds/openldap
26 # Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/net-nds/openldap/ChangeLog,v 1.333 2008/09/03 18:09:42 jokey Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/net-nds/openldap/ChangeLog,v 1.334 2008/10/14 08:59:42 robbat2 Exp $
29 +
30 +*openldap-2.3.43-r1 (14 Oct 2008)
31 +
32 + 14 Oct 2008; Robin H. Johnson <robbat2@g.o>
33 + +files/openldap-2.3.37-libldap_r.patch, +openldap-2.3.43-r1.ebuild:
34 + Bug #189817, fix linking of libldap_r with as-needed.
35
36 *openldap-2.4.11 (03 Sep 2008)
37
38
39
40
41 1.1 net-nds/openldap/openldap-2.3.43-r1.ebuild
42
43 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-nds/openldap/openldap-2.3.43-r1.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-nds/openldap/openldap-2.3.43-r1.ebuild?rev=1.1&content-type=text/plain
45
46 Index: openldap-2.3.43-r1.ebuild
47 ===================================================================
48 # Copyright 1999-2008 Gentoo Foundation
49 # Distributed under the terms of the GNU General Public License v2
50 # $Header: /var/cvsroot/gentoo-x86/net-nds/openldap/openldap-2.3.43-r1.ebuild,v 1.1 2008/10/14 08:59:42 robbat2 Exp $
51
52 EAPI="1"
53
54 WANT_AUTOCONF="latest"
55 WANT_AUTOMAKE="latest"
56 AT_M4DIR="./build"
57 inherit autotools db-use eutils flag-o-matic multilib ssl-cert toolchain-funcs versionator
58
59 DESCRIPTION="LDAP suite of application and development tools"
60 HOMEPAGE="http://www.OpenLDAP.org/"
61 SRC_URI="mirror://openldap/openldap-release/${P}.tgz"
62
63 LICENSE="OPENLDAP"
64 SLOT="0"
65 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd"
66 IUSE="berkdb crypt debug gdbm ipv6 kerberos minimal odbc overlays perl samba sasl slp smbkrb5passwd ssl tcpd selinux"
67
68 # note that the 'samba' USE flag pulling in OpenSSL is NOT an error. OpenLDAP
69 # uses OpenSSL for LanMan/NTLM hashing (which is used in some enviroments, like
70 # mine at work)!
71 # Robin H. Johnson <robbat2@g.o> March 8, 2004
72
73 RDEPEND="sys-libs/ncurses
74 tcpd? ( sys-apps/tcp-wrappers )
75 ssl? ( dev-libs/openssl )
76 sasl? ( dev-libs/cyrus-sasl )
77 !minimal? (
78 odbc? ( dev-db/unixODBC )
79 slp? ( net-libs/openslp )
80 perl? ( dev-lang/perl )
81 samba? ( dev-libs/openssl )
82 kerberos? ( virtual/krb5 )
83 berkdb? (
84 || ( sys-libs/db:4.5
85 sys-libs/db:4.4
86 sys-libs/db:4.3
87 >=sys-libs/db-4.2.52_p2-r1:4.2
88 )
89 )
90 !berkdb? (
91 gdbm? ( sys-libs/gdbm )
92 !gdbm? (
93 || ( sys-libs/db:4.5
94 sys-libs/db:4.4
95 sys-libs/db:4.3
96 >=sys-libs/db-4.2.52_p2-r1:4.2
97 )
98 )
99 )
100 smbkrb5passwd? (
101 dev-libs/openssl
102 app-crypt/heimdal
103 )
104 )
105 selinux? ( sec-policy/selinux-openldap )"
106 DEPEND="${RDEPEND}"
107
108 # for tracking versions
109 OPENLDAP_VERSIONTAG=".version-tag"
110 OPENLDAP_DEFAULTDIR_VERSIONTAG="/var/lib/openldap-data"
111
112 openldap_upgrade_howto() {
113 eerror
114 eerror "A (possible old) installation of OpenLDAP was detected,"
115 eerror "installation will not proceed for now."
116 eerror
117 eerror "As major version upgrades can corrupt your database,"
118 eerror "you need to dump your database and re-create it afterwards."
119 eerror ""
120 d="$(date -u +%s)"
121 l="/root/ldapdump.${d}"
122 i="${l}.raw"
123 eerror " 1. /etc/init.d/slurpd stop ; /etc/init.d/slapd stop"
124 eerror " 2. slapcat -l ${i}"
125 eerror " 3. egrep -v '^entryCSN:' <${i} >${l}"
126 eerror " 4. mv /var/lib/openldap-data/ /var/lib/openldap-data-backup/"
127 eerror " 5. emerge --update \=net-nds/${PF}"
128 eerror " 6. etc-update, and ensure that you apply the changes"
129 eerror " 7. slapadd -l ${l}"
130 eerror " 8. chown ldap:ldap /var/lib/openldap-data/*"
131 eerror " 9. /etc/init.d/slapd start"
132 eerror "10. check that your data is intact."
133 eerror "11. set up the new replication system."
134 eerror
135 die "You need to upgrade your database first"
136 }
137
138 openldap_find_versiontags() {
139 # scan for all datadirs
140 openldap_datadirs=""
141 if [ -f "${ROOT}"/etc/openldap/slapd.conf ]; then
142 openldap_datadirs="$(awk '{if($1 == "directory") print $2 }' ${ROOT}/etc/openldap/slapd.conf)"
143 fi
144 openldap_datadirs="${openldap_datadirs} ${OPENLDAP_DEFAULTDIR_VERSIONTAG}"
145
146 einfo
147 einfo "Scanning datadir(s) from slapd.conf and"
148 einfo "the default installdir for Versiontags"
149 einfo "(${OPENLDAP_DEFAULTDIR_VERSIONTAG} may appear twice)"
150 einfo
151
152 # scan datadirs if we have a version tag
153 openldap_found_tag=0
154 for each in ${openldap_datadirs}; do
155 CURRENT_TAGDIR=${ROOT}`echo ${each} | sed "s:\/::"`
156 CURRENT_TAG=${CURRENT_TAGDIR}/${OPENLDAP_VERSIONTAG}
157 if [ -d ${CURRENT_TAGDIR} ] && [ ${openldap_found_tag} == 0 ] ; then
158 einfo "- Checking ${each}..."
159 if [ -r ${CURRENT_TAG} ] ; then
160 # yey, we have one :)
161 einfo " Found Versiontag in ${each}"
162 source ${CURRENT_TAG}
163 if [ "${OLDPF}" == "" ] ; then
164 eerror "Invalid Versiontag found in ${CURRENT_TAGDIR}"
165 eerror "Please delete it"
166 eerror
167 die "Please kill the invalid versiontag in ${CURRENT_TAGDIR}"
168 fi
169
170 OLD_MAJOR=`get_version_component_range 2-3 ${OLDPF}`
171
172 # are we on the same branch?
173 if [ "${OLD_MAJOR}" != "${PV:0:3}" ] ; then
174 ewarn " Versiontag doesn't match current major release!"
175 if [[ `ls -a ${CURRENT_TAGDIR} | wc -l` -gt 5 ]] ; then
176 eerror " Versiontag says other major and you (probably) have datafiles!"
177 echo
178 openldap_upgrade_howto
179 else
180 einfo " No real problem, seems there's no database."
181 fi
182 else
183 einfo " Versiontag is fine here :)"
184 fi
185 else
186 einfo " Non-tagged dir ${each}"
187 if [[ `ls -a ${each} | wc -l` > 5 ]] ; then
188 einfo " EEK! Non-empty non-tagged datadir, counting `ls -a ${each} | wc -l` files"
189 echo
190
191 eerror
192 eerror "Your OpenLDAP Installation has a non tagged datadir that"
193 eerror "possibly contains a database at ${CURRENT_TAGDIR}"
194 eerror
195 eerror "Please export data if any entered and empty or remove"
196 eerror "the directory, installation has been stopped so you"
197 eerror "can take required action"
198 eerror
199 eerror "For a HOWTO on exporting the data, see instructions in the ebuild"
200 eerror
201 die "Please move the datadir ${CURRENT_TAGDIR} away"
202 fi
203 fi
204 einfo
205 fi
206 done
207
208 echo
209 einfo
210 einfo "All datadirs are fine, proceeding with merge now..."
211 einfo
212
213 }
214
215 pkg_setup() {
216 if has_version "<=dev-lang/perl-5.8.8_rc1" && built_with_use dev-lang/perl minimal ; then
217 die "You must have a complete (USE='-minimal') Perl install to use the perl backend!"
218 fi
219
220 if use samba && ! use ssl ; then
221 eerror "LAN manager passwords need ssl flag set"
222 die "Please set ssl useflag"
223 fi
224
225 if use minimal && has_version "net-nds/openldap" && built_with_use net-nds/openldap minimal ; then
226 einfo
227 einfo "Skipping scan for previous datadirs as requested by minimal useflag"
228 einfo
229 else
230 openldap_find_versiontags
231 fi
232
233 enewgroup ldap 439
234 enewuser ldap 439 -1 /usr/$(get_libdir)/openldap ldap
235 }
236
237 src_unpack() {
238 unpack ${A}
239
240 # According to MDK, the link order needs to be changed so that
241 # on systems w/ MD5 passwords the system crypt library is used
242 # (the net result is that "passwd" can be used to change ldap passwords w/
243 # proper pam support)
244 sed -i -e 's/$(SECURITY_LIBS) $(LDIF_LIBS) $(LUTIL_LIBS)/$(LUTIL_LIBS) $(SECURITY_LIBS) $(LDIF_LIBS)/' \
245 "${S}"/servers/slapd/Makefile.in
246
247 # supersedes old fix for bug #31202
248 EPATCH_OPTS="-p1 -d ${S}" epatch "${FILESDIR}"/${PN}-2.2.14-perlthreadsfix.patch
249
250 # ensure correct SLAPI path by default
251 sed -i -e 's,\(#define LDAPI_SOCK\).*,\1 "/var/run/openldap/slapd.sock",' \
252 "${S}"/include/ldap_defaults.h
253
254 EPATCH_OPTS="-p0 -d ${S}"
255
256 # ximian connector 1.4.7 ntlm patch
257 epatch "${FILESDIR}"/${PN}-2.2.6-ntlm.patch
258
259 # bug #132263
260 epatch "${FILESDIR}"/${PN}-2.3.21-ppolicy.patch
261
262 # bug #189817
263 epatch "${FILESDIR}"/${PN}-2.3.37-libldap_r.patch
264
265 # fix up stuff for newer autoconf that simulates autoconf-2.13, but doesn't
266 # do it perfectly.
267 cd "${S}"/build
268 ln -s shtool install
269 ln -s shtool install.sh
270 einfo "Making sure upstream build strip does not do stripping too early"
271 sed -i.orig \
272 -e '/^STRIP/s,-s,,g' \
273 top.mk || die "Failed to block stripping"
274
275 # bug #116045
276 # patch contrib modules
277 if ! use minimal ; then
278 cd "${S}"/contrib
279 epatch "${FILESDIR}"/${PN}-2.3.24-contrib-smbk5pwd.patch
280 fi
281 }
282
283 src_compile() {
284 local myconf
285
286 #Fix for glibc-2.8 and ucred. Bug 228457.
287 append-flags -D_GNU_SOURCE
288
289 # HDB is only available with BerkDB
290 myconf_berkdb='--enable-bdb --enable-ldbm-api=berkeley --enable-hdb=mod'
291 myconf_gdbm='--disable-bdb --enable-ldbm-api=gdbm --disable-hdb'
292
293 use debug && myconf="${myconf} --enable-debug" # there is no disable-debug
294
295 # enable slapd/slurpd servers if not doing a minimal build
296 if ! use minimal ; then
297 myconf="${myconf} --enable-slapd --enable-slurpd"
298 # base backend stuff
299 myconf="${myconf} --enable-ldbm"
300 if use berkdb ; then
301 einfo "Using Berkeley DB for local backend"
302 myconf="${myconf} ${myconf_berkdb}"
303 # We need to include the slotted db.h dir for FreeBSD
304 append-cppflags -I$(db_includedir 4.5 4.4 4.3 4.2 )
305 elif use gdbm ; then
306 einfo "Using GDBM for local backend"
307 myconf="${myconf} ${myconf_gdbm}"
308 else
309 ewarn "Neither gdbm or berkdb USE flags present, falling back to"
310 ewarn "Berkeley DB for local backend"
311 myconf="${myconf} ${myconf_berkdb}"
312 # We need to include the slotted db.h dir for FreeBSD
313 append-cppflags -I$(db_includedir 4.5 4.4 4.3 4.2 )
314 fi
315 # extra backend stuff
316 myconf="${myconf} --enable-passwd=mod --enable-phonetic=mod"
317 myconf="${myconf} --enable-dnssrv=mod --enable-ldap"
318 myconf="${myconf} --enable-meta=mod --enable-monitor=mod"
319 myconf="${myconf} --enable-null=mod --enable-shell=mod"
320 myconf="${myconf} --enable-relay=mod"
321 myconf="${myconf} $(use_enable perl perl mod)"
322 myconf="${myconf} $(use_enable odbc sql mod)"
323 # slapd options
324 myconf="${myconf} $(use_enable crypt) $(use_enable slp)"
325 myconf="${myconf} --enable-rewrite --enable-rlookups"
326 myconf="${myconf} --enable-aci --enable-modules"
327 myconf="${myconf} --enable-cleartext --enable-slapi"
328 myconf="${myconf} $(use_enable samba lmpasswd)"
329 # slapd overlay options
330 myconf="${myconf} --enable-dyngroup --enable-proxycache"
331 use overlays && myconf="${myconf} --enable-overlays=mod"
332 myconf="${myconf} --enable-syncprov"
333 else
334 myconf="${myconf} --disable-slapd --disable-slurpd"
335 myconf="${myconf} --disable-bdb --disable-ldbm"
336 myconf="${myconf} --disable-hdb --disable-monitor"
337 myconf="${myconf} --disable-slurpd --disable-overlays"
338 myconf="${myconf} --disable-relay"
339 fi
340
341 # basic functionality stuff
342 myconf="${myconf} --enable-syslog --enable-dynamic"
343 myconf="${myconf} --enable-local --enable-proctitle"
344
345 myconf="${myconf} $(use_enable ipv6)"
346 myconf="${myconf} $(use_with sasl cyrus-sasl) $(use_enable sasl spasswd)"
347 myconf="${myconf} $(use_enable tcpd wrappers) $(use_with ssl tls)"
348
349 if [ $(get_libdir) != "lib" ] ; then
350 append-ldflags -L/usr/$(get_libdir)
351 fi
352
353 STRIP=/bin/true \
354 econf \
355 --enable-static \
356 --enable-shared \
357 --libexecdir=/usr/$(get_libdir)/openldap \
358 ${myconf} || die "configure failed"
359
360 emake depend || die "make depend failed"
361 emake || die "make failed"
362
363 # openldap/contrib
364 tc-export CC
365 if ! use minimal ; then
366 # dsaschema
367 einfo "Building contributed dsaschema"
368 cd "${S}"/contrib/slapd-modules/dsaschema
369 ${CC} -shared -I../../../include ${CFLAGS} -fPIC \
370 -Wall -o libdsaschema-plugin.so dsaschema.c || \
371 die "failed to compile dsaschema module"
372 # kerberos passwd
373 if use kerberos ; then
374 einfo "Building contributed pw-kerberos"
375 cd "${S}"/contrib/slapd-modules/passwd/ && \
376 ${CC} -shared -I../../../include ${CFLAGS} -fPIC \
377 -DHAVE_KRB5 -o pw-kerberos.so kerberos.c || \
378 die "failed to compile kerberos password module"
379 fi
380 # netscape mta-md5 password
381 einfo "Building contributed pw-netscape"
382 cd "${S}"/contrib/slapd-modules/passwd/ && \
383 ${CC} -shared -I../../../include ${CFLAGS} -fPIC \
384 -o pw-netscape.so netscape.c || \
385 die "failed to compile netscape password module"
386 # smbk5pwd overlay
387 # Note: this modules builds, but may not work with
388 # Gentoo's MIT-Kerberos. It was designed for Heimdal
389 # Kerberos.
390 if use smbkrb5passwd ; then
391 einfo "Building contributed smbk5pwd"
392 local mydef
393 local mykrb5inc
394 mydef="-DDO_SAMBA -DDO_KRB5"
395 mykrb5inc="-I/usr/include/heimdal/"
396 cd "${S}"/contrib/slapd-modules/smbk5pwd && \
397 libexecdir="/usr/$(get_libdir)/openldap" \
398 DEFS="${mydef}" KRB5_INC="${mykrb5inc}" emake || \
399 die "failed to compile smbk5pwd module"
400 fi
401 # addrdnvalues
402 einfo "Building contributed addrdnvalues"
403 cd "${S}"/contrib/slapi-plugins/addrdnvalues/ && \
404 ${CC} -shared -I../../../include ${CFLAGS} -fPIC \
405 -o libaddrdnvalues-plugin.so addrdnvalues.c || \
406 die "failed to compile addrdnvalues plugin"
407 fi
408 }
409
410 src_test() {
411 einfo "Doing tests"
412 cd tests ; make tests || die "make tests failed"
413 }
414
415 src_install() {
416 emake DESTDIR="${D}" install || die "make install failed"
417
418 dodoc ANNOUNCEMENT CHANGES COPYRIGHT README "${FILESDIR}"/DB_CONFIG.fast.example
419 docinto rfc ; dodoc doc/rfc/*.txt
420
421 # openldap modules go here
422 # TODO: write some code to populate slapd.conf with moduleload statements
423 keepdir /usr/$(get_libdir)/openldap/openldap/
424
425 # make state directories
426 local dirlist="data"
427 if ! use minimal; then
428 dirlist="${dirlist} slurp ldbm"
429 fi
430 for x in ${dirlist}; do
431 keepdir /var/lib/openldap-${x}
432 fowners ldap:ldap /var/lib/openldap-${x}
433 fperms 0700 /var/lib/openldap-${x}
434 done
435
436 echo "OLDPF='${PF}'" > "${D}${OPENLDAP_DEFAULTDIR_VERSIONTAG}/${OPENLDAP_VERSIONTAG}"
437 echo "# do NOT delete this. it is used" >> "${D}${OPENLDAP_DEFAULTDIR_VERSIONTAG}/${OPENLDAP_VERSIONTAG}"
438 echo "# to track versions for upgrading." >> "${D}${OPENLDAP_DEFAULTDIR_VERSIONTAG}/${OPENLDAP_VERSIONTAG}"
439
440 # manually remove /var/tmp references in .la
441 # because it is packaged with an ancient libtool
442 #for x in "${D}"/usr/$(get_libdir)/lib*.la; do
443 # sed -i -e "s:-L${S}[/]*libraries::" ${x}
444 #done
445
446 # change slapd.pid location in configuration file
447 keepdir /var/run/openldap
448 fowners ldap:ldap /var/run/openldap
449 fperms 0755 /var/run/openldap
450
451 if ! use minimal; then
452 # use our config
453 rm "${D}"etc/openldap/slapd.con*
454 insinto /etc/openldap
455 newins "${FILESDIR}"/${PN}-2.3.34-slapd-conf slapd.conf
456 configfile="${D}"etc/openldap/slapd.conf
457
458 # populate with built backends
459 ebegin "populate config with built backends"
460 for x in "${D}"usr/$(get_libdir)/openldap/openldap/back_*.so; do
461 elog "Adding $(basename ${x})"
462 sed -e "/###INSERTDYNAMICMODULESHERE###$/a# moduleload\t$(basename ${x})" -i "${configfile}"
463 done
464 sed -e "s:###INSERTDYNAMICMODULESHERE###$:# modulepath\t/usr/$(get_libdir)/openldap/openldap:" -i "${configfile}"
465 fowners root:ldap /etc/openldap/slapd.conf
466 fperms 0640 /etc/openldap/slapd.conf
467 cp "${configfile}" "${configfile}".default
468 eend
469
470 # install our own init scripts
471 newinitd "${FILESDIR}"/slapd-initd slapd
472 newinitd "${FILESDIR}"/slurpd-initd slurpd
473 newconfd "${FILESDIR}"/slapd-confd slapd
474
475 if [ $(get_libdir) != lib ]; then
476 sed -e "s,/usr/lib/,/usr/$(get_libdir)/," -i "${D}"etc/init.d/{slapd,slurpd}
477 fi
478
479 # install contributed modules
480 docinto /
481 if [ -e "${S}"/contrib/slapd-modules/dsaschema/libdsaschema-plugin.so ];
482 then
483 cd "${S}"/contrib/slapd-modules/dsaschema/
484 newdoc README README.contrib.dsaschema
485 exeinto /usr/$(get_libdir)/openldap/openldap
486 doexe libdsaschema-plugin.so || \
487 die "failed to install dsaschema module"
488 fi
489 if [ -e "${S}"/contrib/slapd-modules/passwd/pw-kerberos.so ]; then
490 cd "${S}"/contrib/slapd-modules/passwd/
491 newdoc README README.contrib.passwd
492 exeinto /usr/$(get_libdir)/openldap/openldap
493 doexe pw-kerberos.so || \
494 die "failed to install kerberos passwd module"
495 fi
496 if [ -e "${S}"/contrib/slapd-modules/passwd/pw-netscape.so ]; then
497 cd "${S}"/contrib/slapd-modules/passwd/
498 newdoc README README.contrib.passwd
499 exeinto /usr/$(get_libdir)/openldap/openldap
500 doexe "${S}"/contrib/slapd-modules/passwd/pw-netscape.so || \
501 die "failed to install Netscape MTA-MD5 passwd module"
502 fi
503 if [ -e "${S}"/contrib/slapd-modules/smbk5pwd/.libs/smbk5pwd.so ]; then
504 cd "${S}"/contrib/slapd-modules/smbk5pwd
505 newdoc README README.contrib.smbk5pwd
506 libexecdir="/usr/$(get_libdir)/openldap" \
507 emake DESTDIR="${D}" install-mod || \
508 die "failed to install smbk5pwd overlay module"
509 fi
510 if [ -e "${S}"/contrib/slapd-tools/statslog ]; then
511 cd "${S}"/contrib/slapd-tools
512 exeinto /usr/bin
513 newexe statslog ldapstatslog || \
514 die "failed to install ldapstatslog script"
515 fi
516 if [ -e "${S}"/contrib/slapi-plugins/addrdnvalues/libaddrdnvalues-plugin.so ];
517 then
518 cd "${S}"/contrib/slapi-plugins/addrdnvalues
519 newdoc README README.contrib.addrdnvalues
520 exeinto /usr/$(get_libdir)/openldap/openldap
521 doexe libaddrdnvalues-plugin.so || \
522 die "failed to install addrdnvalues plugin"
523 fi
524 fi
525 }
526
527 pkg_preinst() {
528 # keep old libs if any
529 LIBSUFFIXES=".so.2.0.130 -2.2.so.7"
530 for LIBSUFFIX in ${LIBSUFFIXES} ; do
531 for each in liblber libldap libldap_r ; do
532 preserve_old_lib "usr/$(get_libdir)/${each}${LIBSUFFIX}"
533 done
534 done
535 }
536
537 pkg_postinst() {
538 if ! use minimal ; then
539 # You cannot build SSL certificates during src_install that will make
540 # binary packages containing your SSL key, which is both a security risk
541 # and a misconfiguration if multiple machines use the same key and cert.
542 # Additionally, it overwrites
543 if use ssl; then
544 install_cert /etc/openldap/ssl/ldap
545 chown ldap:ldap "${ROOT}"etc/openldap/ssl/ldap.*
546 ewarn "Self-signed SSL certificates are treated harshly by OpenLDAP 2.[12]"
547 ewarn "Self-signed SSL certificates are treated harshly by OpenLDAP 2.[12]"
548 ewarn "add 'TLS_REQCERT never' if you want to use them."
549 fi
550 # These lines force the permissions of various content to be correct
551 chown ldap:ldap "${ROOT}"var/run/openldap
552 chmod 0755 "${ROOT}"var/run/openldap
553 chown root:ldap "${ROOT}"etc/openldap/slapd.conf{,.default}
554 chmod 0640 "${ROOT}"etc/openldap/slapd.conf{,.default}
555 chown ldap:ldap "${ROOT}"var/lib/openldap-{data,ldbm,slurp}
556 fi
557
558 # Reference inclusion bug #77330
559 echo
560 elog
561 elog "Getting started using OpenLDAP? There is some documentation available:"
562 elog "Gentoo Guide to OpenLDAP Authentication"
563 elog "(http://www.gentoo.org/doc/en/ldap-howto.xml)"
564 elog
565
566 # note to bug #110412
567 echo
568 elog
569 elog "An example file for tuning BDB backends with openldap is:"
570 elog "/usr/share/doc/${PF}/DB_CONFIG.fast.example.gz"
571 elog
572
573 LIBSUFFIXES=".so.2.0.130 -2.2.so.7"
574 for LIBSUFFIX in ${LIBSUFFIXES} ; do
575 for each in liblber libldap libldap_r ; do
576 preserve_old_lib_notify "usr/$(get_libdir)/${each}${LIBSUFFIX}"
577 done
578 done
579 }