diff options
author | Benjamin Smee <strerror@gentoo.org> | 2006-01-13 16:47:11 +0000 |
---|---|---|
committer | Benjamin Smee <strerror@gentoo.org> | 2006-01-13 16:47:11 +0000 |
commit | e2f47b91857d692b9887671a7cd01cf61c339374 (patch) | |
tree | 1203e2335e3912a8eb4b1d7a4c98bb6fd8ac6f4e /net-nds/openldap | |
parent | Version bump (diff) | |
download | gentoo-2-e2f47b91857d692b9887671a7cd01cf61c339374.tar.gz gentoo-2-e2f47b91857d692b9887671a7cd01cf61c339374.tar.bz2 gentoo-2-e2f47b91857d692b9887671a7cd01cf61c339374.zip |
new 2.1 version to fix bugs #77330 , #105065 , #105380 , #110412 , #114544 , #115741 , #115792 , #115872 - thanks to Markus Ullmann
(Portage version: 2.0.53)
Diffstat (limited to 'net-nds/openldap')
-rw-r--r-- | net-nds/openldap/ChangeLog | 13 | ||||
-rw-r--r-- | net-nds/openldap/Manifest | 19 | ||||
-rw-r--r-- | net-nds/openldap/files/digest-openldap-2.1.30-r7 | 1 | ||||
-rw-r--r-- | net-nds/openldap/files/openldap-2.1.30-autoconf-archived-fix.patch | 67 | ||||
-rw-r--r-- | net-nds/openldap/files/openldap-2.1.30-m4_underquoted.patch | 101 | ||||
-rw-r--r-- | net-nds/openldap/files/openldap-2.1.30-tests.patch | 12 | ||||
-rw-r--r-- | net-nds/openldap/openldap-2.1.30-r7.ebuild | 280 |
7 files changed, 479 insertions, 14 deletions
diff --git a/net-nds/openldap/ChangeLog b/net-nds/openldap/ChangeLog index 0e9fc73bfd15..91123b1e30ad 100644 --- a/net-nds/openldap/ChangeLog +++ b/net-nds/openldap/ChangeLog @@ -1,6 +1,15 @@ # ChangeLog for net-nds/openldap -# Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-nds/openldap/ChangeLog,v 1.156 2005/12/13 23:16:15 ferdy Exp $ +# Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/net-nds/openldap/ChangeLog,v 1.157 2006/01/13 16:47:11 strerror Exp $ + +*openldap-2.1.30-r7 (13 Jan 2006) + + 13 Jan 2006; Benjamin Smee <strerror@gentoo.org> + +files/openldap-2.1.30-autoconf-archived-fix.patch, + +files/openldap-2.1.30-m4_underquoted.patch, + +files/openldap-2.1.30-tests.patch, +openldap-2.1.30-r7.ebuild: + new 2.1 version to fix bugs #77330 , #105065 , #105380 , #110412 , #114544 , + #115741 , #115792 , #115872 - thanks to Markus Ullmann 13 Dec 2005; Fernando J. Pereda <ferdy@gentoo.org> openldap-2.1.30-r6.ebuild, openldap-2.2.28-r3.ebuild: diff --git a/net-nds/openldap/Manifest b/net-nds/openldap/Manifest index c951e172d342..6ad2393d593a 100644 --- a/net-nds/openldap/Manifest +++ b/net-nds/openldap/Manifest @@ -1,7 +1,4 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA1 - -MD5 8fc2420240de8701682a3cdca6e9b8dc ChangeLog 28318 +MD5 0e9dd8d80bdf2b4f929f14b9e4c69c2d ChangeLog 28708 MD5 1a7084c17a74e59db33578c0833e4099 files/2.0/slapd 584 MD5 50257f7d6b63c8e9778b6407c7d2dddb files/2.0/slapd.conf 277 MD5 d68ba97d9f54b8455c1e2d93c352d24a files/2.0/slurpd 495 @@ -15,6 +12,7 @@ MD5 6da89687536a5ec9a422938e997a8a04 files/digest-openldap-2.1.30-r3 65 MD5 6da89687536a5ec9a422938e997a8a04 files/digest-openldap-2.1.30-r4 65 MD5 6da89687536a5ec9a422938e997a8a04 files/digest-openldap-2.1.30-r5 65 MD5 6da89687536a5ec9a422938e997a8a04 files/digest-openldap-2.1.30-r6 65 +MD5 6da89687536a5ec9a422938e997a8a04 files/digest-openldap-2.1.30-r7 65 MD5 27d2ee25b32bf4a429ae80149508ff34 files/digest-openldap-2.2.14 65 MD5 d1db1a9bf4afc66b26e33beef17f07f4 files/digest-openldap-2.2.19 65 MD5 fa0a0dfbb9f3984fb2907c020e02ec73 files/digest-openldap-2.2.23 65 @@ -33,9 +31,12 @@ MD5 c8d6f4ebeb92ef1085b1bb77d7b4db5f files/gencert.sh 3505 MD5 c16eada85fafe1c17bf0089d0ef90ae3 files/gencert.sh-2.2.27 2939 MD5 b10517f0e7be829d47bb8096d86fb519 files/openldap-2.1.27-db40.patch 718 MD5 ca2c43219df88502aafeab9db9eda4d5 files/openldap-2.1.27-perlthreadsfix.patch 967 +MD5 b51f63396bab5123f8b24674ed4481b2 files/openldap-2.1.30-autoconf-archived-fix.patch 1912 MD5 14cfcdbe422004e2e42bfb14cea16a5e files/openldap-2.1.30-autoconf25.patch 382 MD5 c58db81c8d7084a9abf48747134da0a8 files/openldap-2.1.30-db40.patch 718 +MD5 a240004c097944335b15bcb489661c2c files/openldap-2.1.30-m4_underquoted.patch 3916 MD5 07a689148742f0fd74dcedf572a8f092 files/openldap-2.1.30-rpath.patch 13131 +MD5 c3c348e2e475de1b8f04c674aa15d27e files/openldap-2.1.30-tests.patch 378 MD5 1afdae6ce6fa709abed41ce45f41f5e8 files/openldap-2.1.30-tls-activedirectory-hang-fix.patch 1122 MD5 2e6d3f7cf49a1d85468befdff2bfc1d8 files/openldap-2.1.30-ximian_connector.patch 6435 MD5 4c6ef684996786b3a7cc2dc15c4ae7a4 files/openldap-2.2.14-db40.patch 773 @@ -44,7 +45,7 @@ MD5 4591bdcf0bd459c6fdbcabc93f5b6b55 files/openldap-2.2.26-tls-fix-connection-te MD5 14cfcdbe422004e2e42bfb14cea16a5e files/openldap-2.2.28-r1-configure.in-rpath.patch 382 MD5 f940f4e9ac544ed0a0f28b87df5cd2c8 files/openldap-2.2.28-ximian_connector.patch 5669 MD5 7d80c3708d5940a3b7a428740af863d0 files/openldap-2.2.6-ntlm.patch 5011 -MD5 b0d485ea1a51fb83c70daedef2599272 metadata.xml 279 +MD5 a9fa8b856c438b132dac2edbb2d7171a metadata.xml 392 MD5 2e5ce39205e9dc1feeab9ff802236317 openldap-2.1.26.ebuild 7088 MD5 ef0fa55269a7ae32b56ca1095148995a openldap-2.1.27-r1.ebuild 7444 MD5 cfaff772158053886baf083d75fca2ff openldap-2.1.27.ebuild 7051 @@ -54,6 +55,7 @@ MD5 992888650b5b09f265a46469585bcba8 openldap-2.1.30-r3.ebuild 7208 MD5 2d4e17747e16fdd75a17a66c5537184c openldap-2.1.30-r4.ebuild 7308 MD5 2950a8442733483861d191c433359f59 openldap-2.1.30-r5.ebuild 7628 MD5 80349b77cb15c3fcae8812961ade31a2 openldap-2.1.30-r6.ebuild 8137 +MD5 3aed98f59aa3ee758971d217ab0c1298 openldap-2.1.30-r7.ebuild 8901 MD5 aebb509ea0634689f1e3a4549d4d343d openldap-2.1.30.ebuild 7361 MD5 917840881094150cd91192866ec4e1c6 openldap-2.2.14.ebuild 7247 MD5 7ddeb08466499dbe3c49b850b336744f openldap-2.2.19.ebuild 7955 @@ -69,10 +71,3 @@ MD5 d0b2e396543e06107bd1b2f492c246f2 openldap-2.2.28-r1.ebuild 13109 MD5 a6c77f6fc6a7c7af923cc334d2bab94a openldap-2.2.28-r2.ebuild 13214 MD5 bb134104d80c1eafe50d526e99a75032 openldap-2.2.28-r3.ebuild 13715 MD5 72bade434d8afe3c9c9f665518a6d786 openldap-2.2.28.ebuild 12908 ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1.4.2 (GNU/Linux) - -iD8DBQFDpEfJ2+ySkm8kpY0RApbLAKCNRB8566GeDvceRLtll4GjVIw0/ACeNGWt -sM5FGk9I2oDa34bMYjONc20= -=aTB6 ------END PGP SIGNATURE----- diff --git a/net-nds/openldap/files/digest-openldap-2.1.30-r7 b/net-nds/openldap/files/digest-openldap-2.1.30-r7 new file mode 100644 index 000000000000..a6a4a08b05c0 --- /dev/null +++ b/net-nds/openldap/files/digest-openldap-2.1.30-r7 @@ -0,0 +1 @@ +MD5 e2ae8148c4bed07d7a70edd930bdc403 openldap-2.1.30.tgz 2044673 diff --git a/net-nds/openldap/files/openldap-2.1.30-autoconf-archived-fix.patch b/net-nds/openldap/files/openldap-2.1.30-autoconf-archived-fix.patch new file mode 100644 index 000000000000..19a1f710eb17 --- /dev/null +++ b/net-nds/openldap/files/openldap-2.1.30-autoconf-archived-fix.patch @@ -0,0 +1,67 @@ +--- ./configure.in.orig 2005-12-18 15:52:54.000000000 +0100 ++++ ./configure.in 2005-12-18 15:54:24.000000000 +0100 +@@ -683,8 +683,8 @@ + + dnl ---------------------------------------------------------------- + dnl Checks for system services +-AC_CYGWIN +-AC_MINGW32 ++dnl AC_CYGWIN ++dnl AC_MINGW32 + AC_EXEEXT + AC_OBJEXT + +@@ -2308,7 +2308,7 @@ + AC_TYPE_MODE_T + AC_TYPE_OFF_T + AC_TYPE_PID_T +-AM_TYPE_PTRDIFF_T ++AC_CHECK_TYPES([ptrdiff_t]) + AC_TYPE_SIGNAL + AC_TYPE_SIZE_T + +@@ -2337,7 +2337,7 @@ + AC_C_BIGENDIAN + fi + +-AC_COMPILE_CHECK_SIZEOF(short) ++OL_AC_COMPILE_CHECK_SIZEOF(short) +-AC_COMPILE_CHECK_SIZEOF(int) ++OL_AC_COMPILE_CHECK_SIZEOF(int) +-AC_COMPILE_CHECK_SIZEOF(long) ++OL_AC_COMPILE_CHECK_SIZEOF(long) + + if test "$ac_cv_sizeof_int" -lt 4 ; then + AC_MSG_WARN([OpenLDAP requires 'int' to be 32 bits or greater.]) +--- ./build/openldap.m4.orig 2005-12-19 01:20:14.000000000 +0100 ++++ ./build/openldap.m4 2005-12-19 01:24:11.000000000 +0100 +@@ -1237,3 +1237,29 @@ + [define if struct msghdr has msg_accrights]) + fi + ])dnl ++ ++AC_DEFUN([OL_AC_COMPILE_CHECK_SIZEOF], ++[changequote(<<, >>)dnl ++dnl The name to #define. ++define(<<AC_TYPE_NAME>>, translit(sizeof_$1, [a-z *], [A-Z_P]))dnl ++dnl The cache variable name. ++define(<<AC_CV_NAME>>, translit(ac_cv_sizeof_$1, [ *], [_p]))dnl ++changequote([, ])dnl ++AC_MSG_CHECKING(size of $1) ++AC_CACHE_VAL(AC_CV_NAME, ++[for ac_size in 4 8 1 2 16 $2 ; do # List sizes in rough order of prevalence. ++ AC_TRY_COMPILE([#include "confdefs.h" ++#include <sys/types.h> ++$2 ++], [switch (0) case 0: case (sizeof ($1) == $ac_size):;], AC_CV_NAME=$ac_size) ++ if test x$AC_CV_NAME != x ; then break; fi ++done ++]) ++if test x$AC_CV_NAME = x ; then ++ AC_MSG_ERROR([cannot determine a size for $1]) ++fi ++AC_MSG_RESULT($AC_CV_NAME) ++AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME, [The number of bytes in type $1]) ++undefine([AC_TYPE_NAME])dnl ++undefine([AC_CV_NAME])dnl ++]) diff --git a/net-nds/openldap/files/openldap-2.1.30-m4_underquoted.patch b/net-nds/openldap/files/openldap-2.1.30-m4_underquoted.patch new file mode 100644 index 000000000000..84bb7c014f08 --- /dev/null +++ b/net-nds/openldap/files/openldap-2.1.30-m4_underquoted.patch @@ -0,0 +1,101 @@ +--- openldap.m4.orig 2005-03-12 22:03:12.000000000 -0500 ++++ openldap.m4 2005-12-06 17:09:19.000000000 -0500 +@@ -65,7 +65,7 @@ + dnl + dnl ==================================================================== + dnl +-AC_DEFUN(AC_COMPILE_CHECK_SIZEOF, ++AC_DEFUN([AC_COMPILE_CHECK_SIZEOF], + [changequote(<<, >>)dnl + dnl The name to #define. + define(<<AC_TYPE_NAME>>, translit(sizeof_$1, [a-z *], [A-Z_P]))dnl +@@ -173,7 +173,7 @@ + dnl + dnl -------------------------------------------------------------------- + dnl OpenLDAP version of STDC header check w/ EBCDIC support +-AC_DEFUN(OL_HEADER_STDC, ++AC_DEFUN([OL_HEADER_STDC], + [AC_REQUIRE_CPP()dnl + AC_REQUIRE([OL_CPP_EBCDIC])dnl + AC_CACHE_CHECK([for ANSI C header files], ol_cv_header_stdc, +@@ -1016,7 +1020,7 @@ + dnl Early MIPS compilers (used in Ultrix 4.2) don't like + dnl "int x; int *volatile a = &x; *a = 0;" + dnl -- borrowed from PDKSH +-AC_DEFUN(OL_C_VOLATILE, ++AC_DEFUN([OL_C_VOLATILE], + [AC_CACHE_CHECK(if compiler understands volatile, ol_cv_c_volatile, + [AC_TRY_COMPILE([int x, y, z;], + [volatile int a; int * volatile b = x ? &y : &z; +@@ -1052,7 +1056,7 @@ + dnl + dnl ==================================================================== + dnl Define sig_atomic_t if not defined in signal.h +-AC_DEFUN(OL_TYPE_SIG_ATOMIC_T, ++AC_DEFUN([OL_TYPE_SIG_ATOMIC_T], + [AC_CACHE_CHECK(for sig_atomic_t, ol_cv_type_sig_atomic_t, + [AC_TRY_COMPILE([#include <signal.h>], [sig_atomic_t atomic;], + ol_cv_type_sig_atomic_t=yes, ol_cv_type_sig_atomic_t=no)]) +@@ -1064,7 +1068,7 @@ + dnl + dnl ==================================================================== + dnl Define socklen_t if not defined in sys/types.h or sys/socket.h +-AC_DEFUN(OL_TYPE_SOCKLEN_T, ++AC_DEFUN([OL_TYPE_SOCKLEN_T], + [AC_CACHE_CHECK(for socklen_t, ol_cv_type_socklen_t, + [AC_TRY_COMPILE([ + #ifdef HAVE_SYS_TYPES_H +@@ -1083,7 +1087,7 @@ + dnl + dnl ==================================================================== + dnl Define inet_aton is available +-AC_DEFUN(OL_FUNC_INET_ATON, ++AC_DEFUN([OL_FUNC_INET_ATON], + [AC_CACHE_CHECK([for inet_aton()], ol_cv_func_inet_aton, + [AC_TRY_LINK([ + #ifdef HAVE_SYS_TYPES_H +@@ -1110,7 +1114,7 @@ + dnl + dnl ==================================================================== + dnl check no of arguments for ctime_r +-AC_DEFUN(OL_FUNC_CTIME_R_NARGS, ++AC_DEFUN([OL_FUNC_CTIME_R_NARGS], + [AC_CACHE_CHECK(number of arguments of ctime_r, ol_cv_func_ctime_r_nargs, + [AC_TRY_COMPILE([#include <time.h>], + [time_t ti; char *buffer; ctime_r(&ti,buffer,32);], +@@ -1145,7 +1149,7 @@ + dnl + dnl -------------------------------------------------------------------- + dnl check return type of ctime_r() +-AC_DEFUN(OL_FUNC_CTIME_R_TYPE, ++AC_DEFUN([OL_FUNC_CTIME_R_TYPE], + [AC_CACHE_CHECK(return type of ctime_r, ol_cv_func_ctime_r_type, + [AC_TRY_COMPILE([#include <time.h>], + [extern int (ctime_r)();], +@@ -1157,7 +1161,7 @@ + ])dnl + dnl ==================================================================== + dnl check no of arguments for gethostbyname_r +-AC_DEFUN(OL_FUNC_GETHOSTBYNAME_R_NARGS, ++AC_DEFUN([OL_FUNC_GETHOSTBYNAME_R_NARGS], + [AC_CACHE_CHECK(number of arguments of gethostbyname_r, + ol_cv_func_gethostbyname_r_nargs, + [AC_TRY_COMPILE([#include <sys/types.h> +@@ -1207,7 +1211,7 @@ + ])dnl + dnl + dnl check no of arguments for gethostbyaddr_r +-AC_DEFUN(OL_FUNC_GETHOSTBYADDR_R_NARGS, ++AC_DEFUN([OL_FUNC_GETHOSTBYADDR_R_NARGS], + [AC_CACHE_CHECK(number of arguments of gethostbyaddr_r, + [ol_cv_func_gethostbyaddr_r_nargs], + [AC_TRY_COMPILE([#include <sys/types.h> +@@ -1283,7 +1287,7 @@ + ]) + dnl ==================================================================== + dnl check for msg_accrights in msghdr +-AC_DEFUN(OL_MSGHDR_MSG_ACCRIGHTS, ++AC_DEFUN([OL_MSGHDR_MSG_ACCRIGHTS], + [AC_CACHE_CHECK(for msg_accrights in msghdr, ol_cv_msghdr_msg_accrights, + [AC_TRY_COMPILE([#include <sys/socket.h>], + [struct msghdr m; m.msg_accrightslen=0], diff --git a/net-nds/openldap/files/openldap-2.1.30-tests.patch b/net-nds/openldap/files/openldap-2.1.30-tests.patch new file mode 100644 index 000000000000..5cde2ba073c4 --- /dev/null +++ b/net-nds/openldap/files/openldap-2.1.30-tests.patch @@ -0,0 +1,12 @@ +--- ./Makefile.in.orig 2003-03-03 18:10:11.000000000 +0100 ++++ ./Makefile.in 2005-12-18 15:45:08.000000000 +0100 +@@ -8,6 +8,9 @@ + BUILD_BDB=@BUILD_BDB@ + BUILD_MONITOR=@BUILD_MONITOR@ + ++LD_LIBRARY_PATH=${pwd}../libraries/libldap_r/.libs:${pwd}../libraries/liblber/.libs:${pwd}../libraries/libldap/.libs:$LD_LIBRARY_PATH ++export LD_LIBRARY_PATH ++ + test: tests + tests: bdb ldbm + diff --git a/net-nds/openldap/openldap-2.1.30-r7.ebuild b/net-nds/openldap/openldap-2.1.30-r7.ebuild new file mode 100644 index 000000000000..6876fd0f9f89 --- /dev/null +++ b/net-nds/openldap/openldap-2.1.30-r7.ebuild @@ -0,0 +1,280 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-nds/openldap/openldap-2.1.30-r7.ebuild,v 1.1 2006/01/13 16:47:11 strerror Exp $ + +inherit eutils + +DESCRIPTION="LDAP suite of application and development tools" +HOMEPAGE="http://www.OpenLDAP.org/" +SRC_URI="mirror://openldap/openldap-release/${P}.tgz" + +LICENSE="OPENLDAP" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86" +IUSE="berkdb crypt debug gdbm ipv6 odbc perl readline samba sasl slp ssl tcpd selinux" + +DEPEND=">=sys-libs/ncurses-5.1 + >=sys-apps/sed-4 + tcpd? ( >=sys-apps/tcp-wrappers-7.6 ) + ssl? ( >=dev-libs/openssl-0.9.6 ) + readline? ( >=sys-libs/readline-4.1 ) + sasl? ( >=dev-libs/cyrus-sasl-2.1.7-r3 ) + odbc? ( dev-db/unixODBC ) + slp? ( >=net-libs/openslp-1.0 ) + perl? ( >=dev-lang/perl-5.6 ) + samba? ( >=dev-libs/openssl-0.9.6 )" + +# note that the 'samba' USE flag pulling in OpenSSL is NOT an error. OpenLDAP +# uses OpenSSL for LanMan/NTLM hashing (which is used in some enviroments, like +# mine at work)! +# Robin H. Johnson <robbat2@gentoo.org> March 8, 2004 + +# if USE=berkdb +# pull in sys-libs/db +# else if USE=gdbm +# pull in sys-libs/gdbm +# else +# pull in sys-libs/db +DEPEND="${DEPEND} + berkdb? ( >=sys-libs/db-4.1.25_p1-r3 ) + !berkdb? ( + gdbm? ( >=sys-libs/gdbm-1.8.0 ) + !gdbm? ( >=sys-libs/db-4.1.25_p1-r3 ) + )" + +RDEPEND=" + ${DEPEND} + selinux? ( sec-policy/selinux-openldap )" + +pkg_preinst() { + enewgroup ldap 439 + enewuser ldap 439 -1 /usr/lib/openldap ldap +} + +pkg_setup() { + if use perl && built_with_use dev-lang/perl minimal ; then + die "You must have a complete (USE='-minimal') Perl install to use the perl backend!" + fi +} + +src_unpack() { + unpack ${A} + + # According to MDK, the link order needs to be changed so that + # on systems w/ MD5 passwords the system crypt library is used + # (the net result is that "passwd" can be used to change ldap passwords w/ + # proper pam support) + sed -ie 's/$(SECURITY_LIBS) $(LDIF_LIBS) $(LUTIL_LIBS)/$(LUTIL_LIBS) $(SECURITY_LIBS) $(LDIF_LIBS)/' \ + ${S}/servers/slapd/Makefile.in + + # Fix up DB-4.0 linking problem + # remember to autoconf! this expands configure by 500 lines (4 lines to m4 + # stuff). + epatch ${FILESDIR}/${PN}-2.1.30-db40.patch + epatch ${FILESDIR}/${PN}-2.1.30-tls-activedirectory-hang-fix.patch + + # Security bug #96767 + # http://bugzilla.padl.com/show_bug.cgi?id=210 + EPATCH_OPTS="-p1 -d ${S}" epatch ${FILESDIR}/${PN}-2.2.26-tls-fix-connection-test.patch + + # supersedes old fix for bug #31202 + cd ${S} + epatch ${FILESDIR}/${PN}-2.1.27-perlthreadsfix.patch + + # fix up stuff for newer autoconf that simulates autoconf-2.13, but doesn't + # do it perfectly. + cd ${S}/build + ln -s shtool install + ln -s shtool install.sh + + # ximian connector 1.4.7 ntlm patch + cd ${S} + epatch ${FILESDIR}/${PN}-2.1.30-ximian_connector.patch + + export WANT_AUTOMAKE="1.9" + export WANT_AUTOCONF="2.5" + + #make files ready for new autoconf + EPATCH_OPTS="-p0 -d ${S}" epatch ${FILESDIR}/${PN}-2.1.30-autoconf25.patch + + # fix AC calls bug #114544 + EPATCH_OPTS="-p0 -d ${S}/build" epatch ${FILESDIR}/${PN}-2.1.30-m4_underquoted.patch + + # make tests rpath ready + EPATCH_OPTS="-p0 -d ${S}/tests" epatch ${FILESDIR}/${PN}-2.1.30-tests.patch + + # make autoconf-archive compatible + EPATCH_OPTS="-p0 -d ${S}" epatch ${FILESDIR}/${PN}-2.1.30-autoconf-archived-fix.patch + + # reconf compat and current for RPATH solve + cd ${S} + einfo "Running libtoolize on ${S}" + libtoolize --copy --force + einfo "Running aclocal on ${S}" + aclocal || die "aclocal failed" + EPATCH_OPTS="-p0 -d ${S}" epatch ${FILESDIR}/${PN}-2.1.30-rpath.patch + einfo "Running autoconf on ${S}" + autoconf || die "autoconf failed" +} + +src_compile() { + local myconf + + # enable debugging to syslog + use debug && myconf="${myconf} --enable-debug" + myconf="${myconf} --enable-syslog" + + # enable slapd/slurpd servers + myconf="${myconf} --enable-ldap" + myconf="${myconf} --enable-slapd --enable-slurpd" + + myconf="${myconf} `use_enable crypt`" + myconf="${myconf} `use_enable ipv6`" + myconf="${myconf} `use_with sasl cyrus-sasl` `use_enable sasl spasswd`" + myconf="${myconf} `use_with readline`" + myconf="${myconf} `use_with ssl tls` `use_with samba lmpasswd`" + myconf="${myconf} `use_enable tcpd wrappers`" + myconf="${myconf} `use_enable odbc sql`" + myconf="${myconf} `use_enable perl`" + myconf="${myconf} `use_enable slp`" + + myconf="${myconf} --enable-ldbm" + myconf_berkdb='--enable-bdb --with-ldbm-api=berkeley' + myconf_gdbm='--disable-bdb --with-ldbm-api=gdbm' + if use berkdb; then + einfo "Using Berkeley DB for local backend" + myconf="${myconf} ${myconf_berkdb}" + elif use gdbm; then + einfo "Using GDBM for local backend" + myconf="${myconf} ${myconf_gdbm}" + else + ewarn "Neither gdbm or berkdb USE flags present, falling back to" + ewarn "Berkeley DB for local backend" + myconf="${myconf} ${myconf_berkdb}" + fi + + # alas, for BSD only + #myconf="${myconf} --with-fetch" + + myconf="${myconf} --enable-dynamic --enable-modules" + myconf="${myconf} --enable-rewrite --enable-rlookups" + myconf="${myconf} --enable-passwd --enable-phonetic" + myconf="${myconf} --enable-dnssrv --enable-ldap" + myconf="${myconf} --enable-meta --enable-monitor" + myconf="${myconf} --enable-null --enable-shell" + myconf="${myconf} --enable-local --enable-proctitle" + + # disabled options + # --with-bdb-module=dynamic + # --enable-dnsserv --with-dnsserv-module=dynamic + + econf \ + --enable-static \ + --enable-shared \ + --libexecdir=/usr/lib/openldap \ + ${myconf} || die "configure failed" + + make depend || die "make depend failed" + make || die "make failed" + +} + +src_test() { + einfo "Doing tests" + cd tests ; make tests || die "make tests failed" +} + +src_install() { + make DESTDIR=${D} install || die "make install failed" + + dodoc ANNOUNCEMENT CHANGES COPYRIGHT README LICENSE ${FILESDIR}/DB_CONFIG.fast.example + docinto rfc ; dodoc doc/rfc/*.txt + + # make state directories + for x in data slurp ldbm; do + keepdir /var/lib/openldap-${x} + fowners ldap:ldap /var/lib/openldap-${x} + fperms 0700 /var/lib/openldap-${x} + done + + # manually remove /var/tmp references in .la + # because it is packaged with an ancient libtool + for x in ${D}/usr/lib/lib*.la; do + sed -i -e "s:-L${S}[/]*libraries::" ${x} + done + + # change slapd.pid location in configuration file + keepdir /var/run/openldap + fowners ldap:ldap /var/run/openldap + fperms 0755 /var/run/openldap + for f in /etc/openldap/slapd.conf /etc/openldap/slapd.conf.default; do + sed -e "s:/var/lib/slapd.:/var/run/openldap/slapd.:" -i ${D}/${f} + sed -e "/database\tbdb$/acheckpoint 32 30 # <kbyte> <min>" -i ${D}/${f} + fowners root:ldap ${f} + fperms 0640 ${f} + done + + # install our own init scripts + exeinto /etc/init.d + newexe ${FILESDIR}/2.0/slapd slapd + newexe ${FILESDIR}/2.0/slurpd slurpd + insinto /etc/conf.d + newins ${FILESDIR}/2.0/slapd.conf slapd + + # install MDK's ssl cert script + if use ssl || use samba; then + dodir /etc/openldap/ssl + exeinto /etc/openldap/ssl + doexe ${FILESDIR}/gencert.sh + fi +} + +pkg_postinst() { + if use ssl; then + # make a self-signed ssl cert (if there isn't one there already) + if [ ! -e /etc/openldap/ssl/ldap.pem ] + then + cd /etc/openldap/ssl + yes "" | sh gencert.sh + chmod 640 ldap.pem + chown root:ldap ldap.pem + else + einfo "An LDAP cert already appears to exist, no creating" + fi + fi + + # Since moving to running openldap as user ldap there are some + # permissions problems with directories and files. + # Let's make sure these permissions are correct. + chown ldap:ldap /var/run/openldap + chmod 0755 /var/run/openldap + chown root:ldap /etc/openldap/slapd.conf + chmod 0640 /etc/openldap/slapd.conf + chown root:ldap /etc/openldap/slapd.conf.default + chmod 0640 /etc/openldap/slapd.conf.default + chown ldap:ldap /var/lib/openldap-{data,ldbm,slurp} + + # notes from bug #41297, bug #41039 + ewarn "If you are upgrading from OpenLDAP 2.0, major changes have occured:" + ewarn "- bind_anon_dn is now disabled by default for security" + ewarn " add 'allow bind_anon_dn' to your config for the old behavior." + ewarn "- Default schemas have changed, you should slapcat your entire DB to" + ewarn " a file, delete your DB, and then slapadd it again. Alternatively" + ewarn " you can try slapindex which should work in almost all cases. Be" + ewarn " sure to check the permissions on the database files afterwards!" + if use ssl; then + ewarn "- Self-signed SSL certificates are treated harshly by OpenLDAP 2.1" + ewarn " add 'TLS_REQCERT never' if you want to use them." + fi + + # Reference inclusion bug #77330 + echo + einfo "Getting started using OpenLDAP? There is some documentation available:" + einfo "Gentoo Guide to OpenLDAP Authentication" + einfo "(http://www.gentoo.org/doc/en/ldap-howto.xml)" + + # note to bug #110412 + echo + einfo "An example file for tuning BDB backends with openldap is:" + einfo "/usr/share/doc/${P}/DB_CONFIG.fast.example.gz" +} |