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