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